Set-EntraBetaPasswordSingleSignOnCredential
Sets the password Single-Sign-On (SSO) credentials.
Syntax
Set-EntraBetaPasswordSingleSignOnCredential
-ServicePrincipalId <String>
-PasswordSSOCredential <PasswordSSOCredentials>
[<CommonParameters>]
Description
This cmdlet enables users to set their Password Single-Sign-On credentials for an application that they're part of. Specify ServicePrincipalId
and PasswordSSOCredential
parameters to updates SSO credentials.
Admin could set the group credentials as well.
Examples
Example 1: Set password single-sign-on credentials
Connect-Entra -Scopes 'Application.ReadWrite.All', 'Directory.ReadWrite.All'
$servicePrincipal = Get-EntraBetaservicePrincipal -SearchString '<service-principal-name>'
$credentials = New-Object -TypeName Microsoft.Open.MSGraph.Model.PasswordSSOCredentials
$credentials.Id = '<user-or-group-Id>'
$creds1 = [Microsoft.Open.MSGraph.Model.PasswordSSOCredential]@{FieldId = "param_emailOrUserName"; Value = "foobar@ms.com"; Type = "text" }
$creds2 = [Microsoft.Open.MSGraph.Model.PasswordSSOCredential]@{FieldId = "param_password"; Value = "my-secret"; Type = "password" }
$credentials.Credentials = @($creds1, $creds2)
Set-EntraBetaPasswordSingleSignOnCredential -ServicePrincipalId $servicePrincipal.Id -PasswordSSOCredential $credentials
This example demonstrates how to set the password SSO credentials for the given ServicePrincipalId and PasswordSSOObjectId.
-PasswordSSOObjectId
parameter specifies the User or Group ID.-ServicePrincipalId
parameter specifies the object ID of a service principal.
Parameters
-PasswordSSOCredential
User or group ID.
Type: | System.PasswordSSOCredentials |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServicePrincipalId
The unique identifier of the object specific Microsoft Entra ID object.
Type: | System.String |
Aliases: | ObjectId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |