diff --git a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Add-MgServicePrincipalPassword.md b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Add-MgServicePrincipalPassword.md index 4ed19094e6d..48bd4ab36dd 100644 --- a/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Add-MgServicePrincipalPassword.md +++ b/microsoftgraph/graph-powershell-1.0/Microsoft.Graph.Applications/Add-MgServicePrincipalPassword.md @@ -61,13 +61,17 @@ Add a strong password or secret to a servicePrincipal object. Import-Module Microsoft.Graph.Applications +$servicePrincipalId = 'your-service-principal-id' + $params = @{ passwordCredential = @{ displayName = "Password friendly name" } } -Add-MgServicePrincipalPassword -ServicePrincipalId $servicePrincipalId -BodyParameter $params +$secret = Add-MgServicePrincipalPassword -ServicePrincipalId $servicePrincipalId -BodyParameter $params + +$secret | format-list ``` This example shows how to use the Add-MgServicePrincipalPassword Cmdlet.