Set-​Azure​AD​User​Extension

Sets a user extension.

Syntax

Set-AzureADUserExtension
   -ExtensionName <String>
   -ExtensionValue <String>
   -ObjectId <String>
   [<CommonParameters>]
Set-AzureADUserExtension
   -ExtensionNameValues <System.Collections.Generic.Dictionary`2[System.String,System.String]>
   -ObjectId <String>
   [<CommonParameters>]

Description

The Set-AzureADUserExtension cmdlet sets a user extension in Azure Active Directory (Azure AD).

Examples

Example 1: Set the value of an extension attribute for a user

PS C:\> $User = Get-AzureADUser -Top 1
PS C:\> Set-AzureADUserExtension -ObjectId $User.ObjectId -ExtensionName extension_e5e29b8a85d941eab8d12162bd004528_extensionAttribute8 -ExtensionValue "New Value"

The first command gets a user by using the Get-AzureADUser cmdlet, and then stores it in the $User variable.

The second command sets the value of the extension attribute that hast he specified name to the value New Value. You can get extension attribute names by using the Get-AzureAdExtensionProperty cmdlet.

Required Parameters

-ExtensionName

Specifies the name of an extension.

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

Specifies extension name values.

Type:System.Collections.Generic.Dictionary`2[System.String,System.String]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-ExtensionValue

Specifies an extension value.

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

Specifies the ID of an object.

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