Set-​Azure​Rm​AD​Service​Principal

Updates an existing azure active directory service principal.

Syntax

Set-AzureRmADServicePrincipal
   -DisplayName <String>
   -ObjectId <String>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
Set-AzureRmADServicePrincipal
   -DisplayName <String>
   -ServicePrincipalName <String>
   [-Confirm]
   [-WhatIf]
   [<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 Set-AzureRmADApplication cmdlet.

Examples

-------------------------- Example 1 --------------------------

Set-AzureRmADServicePrincipal -ObjectId 784136ca-3ae2-4fdd-a388-89d793e7c780 -DisplayName "UpdatedNameForSp"

Updates the display name for the service principal with specified object id.

-------------------------- Example 2 --------------------------

Set-AzureRmADServicePrincipal -ServicePrincipalName "http://MyApp1" -DisplayName "UpdatedNameforSp"

Updates the display name for the service principal with specified service principal name.

Required Parameters

-DisplayName

New display name for the service principal.

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

The object id of the service principal to update.

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

The SPN of service principal to update.

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

Optional Parameters

-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
-WhatIf
Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False