Edit

Share via


New-EntraBetaPasswordSingleSignOnCredential

Creates the password Single-Sign-On (SSO) credentials.

Syntax

Default (Default)

New-EntraBetaPasswordSingleSignOnCredential

    -ServicePrincipalId <String>
    -PasswordSSOCredential <PasswordSSOCredentials>
    [<CommonParameters>]

Description

This cmdlet enables users to create their Password Single-Sign-On credentials for an application that they're part of. Specify ServicePrincipalId and PasswordSSOCredential parameters to create an SSO credentials. Admin could create the group credentials as well.

Examples

Example 1: New password single-sign-on credentials

Connect-Entra -Scopes 'Application.ReadWrite.All', 'Directory.ReadWrite.All'
$credentials = New-Object -TypeName Microsoft.Open.MSGraph.Model.PasswordSSOCredentials
$credentials.Id = '<user-or-group-Id>'
$servicePrincipal = Get-EntraBetaservicePrincipal -SearchString '<service-principal-name>'
$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)
New-EntraBetaPasswordSingleSignOnCredential -ServicePrincipalId $servicePrincipal.Id -PasswordSSOCredential $credentials
Id
--
cccccccc-2222-3333-4444-dddddddddddd

This example demonstrates how to create an password SSO credential 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.

Parameter properties

Type:System.PasswordSSOCredentials
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-ServicePrincipalId

The unique identifier of the service principal object.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ObjectId

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

Microsoft.Online.Administration.PasswordSSOCredentials