Update-AzureRmADServicePrincipal
Updates an existing Microsoft Entra service principal.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
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 Microsoft Entra 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 00001111-aaaa-2222-bbbb-3333cccc4444 -DisplayName MyNewDisplayName
Updates the display name of the service principal with object id '00001111-aaaa-2222-bbbb-3333cccc4444' to be 'MyNewDisplayName'.
Example 2 - Update the display name of a service principal using piping
PS C:\> Get-AzureRmADServicePrincipal -ObjectId 00001111-aaaa-2222-bbbb-3333cccc4444 | Update-AzureRmADServicePrincipal -DisplayName MyNewDisplayName
Gets the service principal with object id '00001111-aaaa-2222-bbbb-3333cccc4444' 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 |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisplayName
The display name for the service principal.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Homepage
The homepage for the service principal.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IdentifierUri
The identifier URI(s) for the service principal.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
The object representing the service principal to update.
Type: | PSADServicePrincipal |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-KeyCredential
The key credential(s) for the service principal.
Type: | KeyCredential[] |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PasswordCredential
The password credential(s) for the service principal.
Type: | PasswordCredential[] |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Required: | True |
Accept pipeline input: | True |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Parameters: InputObject (ByValue)