Skip to content

Commit 91524aa

Browse files
Update Remove-AzureADServicePrincipalKeyCredential.md
Insert a sample and its goal, for future reference
1 parent a457b30 commit 91524aa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

azureadps-2.0/AzureAD/Remove-AzureADServicePrincipalKeyCredential.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ The Remove-AzureADServicePrincipalKeyCredential cmdlet removes a key credential
2424

2525
### Example 1
2626
```powershell
27-
PS C:\> {{ Add example code here }}
27+
PS C:\> Get-AzureADServicePrincipal -SearchString 'Azure Multi-Factor Auth Client' | fl
28+
PS C:\> $SPObjectID = (Get-AzureADServicePrincipal -SearchString 'Azure Multi-Factor Auth Client').ObjectID
29+
PS C:\> Remove-AzureADServicePrincipalKeyCredential -ObjectID $SPObjectID -KeyId <PASTE_KEYID_VALUE>
2830
```
2931

30-
{{ Add example description here }}
32+
It displays service principal information, including all available key credentials (certificates) with their start and end date and associated key ID.<br>
33+
Copy the pretended **KeyID** associated with the certificate to be removed and paste it at the **<PASTE_KEYID_VALUE>**.<br>
34+
After assigning **ObjectID** value to local variable, it will remove certificate (key credential) from service principal configuration.
3135

3236
## PARAMETERS
3337

0 commit comments

Comments
 (0)