Update-AzureRmADServicePrincipal

Updates an existing azure active directory service principal.

Syntax

Update-AzureRmADServicePrincipal
      -ObjectId <Guid>
      [-DisplayName <String>]
      [-Homepage <String>]
      [-IdentifierUri <String[]>]
      [-KeyCredential <KeyCredential[]>]
      [-PasswordCredential <PasswordCredential[]>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmADServicePrincipal
      -ApplicationId <Guid>
      [-Homepage <String>]
      [-IdentifierUri <String[]>]
      [-KeyCredential <KeyCredential[]>]
      [-PasswordCredential <PasswordCredential[]>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmADServicePrincipal
      -ServicePrincipalName <String>
      [-DisplayName <String>]
      [-Homepage <String>]
      [-IdentifierUri <String[]>]
      [-KeyCredential <KeyCredential[]>]
      [-PasswordCredential <PasswordCredential[]>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzureRmADServicePrincipal
      -InputObject <PSADServicePrincipal>
      [-DisplayName <String>]
      [-Homepage <String>]
      [-IdentifierUri <String[]>]
      [-KeyCredential <KeyCredential[]>]
      [-PasswordCredential <PasswordCredential[]>]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Updates an existing azure active directory service principal. To update the credentials associated with this service principal, please use New-AzureRmADSpCredential cmdlet. To update the properties associated with the underlying application, please use Update-AzureRmADApplication cmdlet.

Examples

Example 1 - Update the display name of a service principal

PS C:\> Update-AzureRmADServicePrincipal -ObjectId 784136ca-3ae2-4fdd-a388-89d793e7c780 -DisplayName MyNewDisplayName

Updates the display name of the service principal with object id '784136ca-3ae2-4fdd-a388-89d793e7c780' to be 'MyNewDisplayName'.

Example 2 - Update the display name of a service principal using piping

PS C:\> Get-AzureRmADServicePrincipal -ObjectId 784136ca-3ae2-4fdd-a388-89d793e7c780 | Update-AzureRmADServicePrincipal -DisplayName MyNewDisplayName

Gets the service principal with object id '784136ca-3ae2-4fdd-a388-89d793e7c780' and pipes that to the Update-AzureRmADServicePrincipal cmdlet to update the display name of the service principal to "MyNewDisplayName".

Parameters

-ApplicationId

The application id of the service principal to update.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisplayName

The display name for the service principal.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Homepage

The homepage for the service principal.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IdentifierUri

The identifier URI(s) for the service principal.

Type:System.String[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

The object representing the service principal to update.

Type:Microsoft.Azure.Graph.RBAC.Version1_6.ActiveDirectory.PSADServicePrincipal
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-KeyCredential

The key credential(s) for the service principal.

Type:Microsoft.Azure.Graph.RBAC.Version1_6.Models.KeyCredential[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ObjectId

The object id of the service principal to update.

Type:Guid
Aliases:ServicePrincipalObjectId
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PasswordCredential

The password credential(s) for the service principal.

Type:Microsoft.Azure.Graph.RBAC.Version1_6.Models.PasswordCredential[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServicePrincipalName

The SPN of the service principal to update.

Type:String
Aliases:SPN
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Guid

String

Microsoft.Azure.Graph.RBAC.Version1_6.ActiveDirectory.PSADServicePrincipal

Parameters: InputObject (ByValue)

Outputs

Microsoft.Azure.Graph.RBAC.Version1_6.ActiveDirectory.PSADServicePrincipal