Edit

Share via


Set-AzureADUserExtension

Sets a user extension.

Syntax

SetSingle

Set-AzureADUserExtension
    -ObjectId <String>
    -ExtensionName <String>
    -ExtensionValue <String>
    [<CommonParameters>]

SetMultiple

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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetSingle
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-ExtensionNameValues

Specifies extension name values.

Parameter properties

Type:

Dictionary<TKey,TValue>[System.String,System.String]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetMultiple
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-ExtensionValue

Specifies an extension value.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetSingle
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-ObjectId

Specifies the ID of an object.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.