Изменить

Поделиться через


Set-EntraUserExtension

Sets a user extension.

Syntax

Set-EntraUserExtension
   -UserId <String>
   [<CommonParameters>]

Description

The Set-EntraUserExtension cmdlet updates a user extension in Microsoft Entra ID.

Examples

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

Connect-Entra -Scopes 'User.ReadWrite.All'
$extensionName = 'extension_e5e29b8a85d941eab8d12162bd004528_extensionAttribute8'
$extensionValue = 'New Value'
Set-EntraUserExtension -ObjectId 'SawyerM@contoso.com' -ExtensionName $extensionName -ExtensionValue $extensionValue

This example shows how to update the value of the extension attribute for a specified user.

  • -UserId parameter specifies the user Id.
  • -ExtensionName parameter specifies the name of an extension.
  • -ExtensionValue parameter specifies the extension name values.

Parameters

-UserId

Specifies the ID of the user.

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