Set-AzureADUserExtension

Sets a user extension.

Syntax

Set-AzureADUserExtension
   -ObjectId <String>
   -ExtensionName <String>
   -ExtensionValue <String>
   [<CommonParameters>]
Set-AzureADUserExtension
   -ObjectId <String>
   -ExtensionNameValues <System.Collections.Generic.Dictionary`2[System.String,System.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 has the specified name to the value New Value. You can get extension attribute names by using the Get-AzureAdExtensionProperty cmdlet.

Parameters

-ExtensionName

Specifies the name of an extension.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ExtensionNameValues

Specifies extension name values.

Type:Dictionary<TKey,TValue>[System.String,System.String]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ExtensionValue

Specifies an extension value.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ObjectId

Specifies the ID of an object.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False