Thursday, October 8, 2020

Create custom attribute and update value for guest account users

// Update custom attribute of the user.

Connect-AzureAD 

Get-AzureADUser -ObjectId 79a36543-1e05-4407-9e74-df6bea9135d4 | Select -ExpandProperty ExtensionProperty

Set-AzureADUserExtension -ObjectId 79a36543-1e05-4407-9e74-df6bea9135d4 -ExtensionName "extension_2c8a597a3ee24c138b03a0a67c5180b7_aribaemployeeID" -ExtensionValue "0000809999"
Code with variable
Connect-AzureAD # Enter your Azrue Admin/pwd 

$UserObjectID  = "32b290fb-ea39-4f9b-b4a1-268fb2" # Copy the object id of the user from Azure AD 
$UserAribaID = "0000900022" # Enter user's employee id adding 0 as prefix to make this 10 chararcter example Employee ID = 901022 , Ariba ID = 0000900022
Get-AzureADUser -ObjectId $UserObjectID | Select -ExpandProperty ExtensionProperty # Check extension property before update Set-AzureADUserExtension -ObjectId $UserObjectID -ExtensionName "extension_2c8a597a3ee24c138b03a0a67c5180b7_aribaemployeeID" -ExtensionValue $UserAribaID Get-AzureADUser -ObjectId $UserObjectID | Select -ExpandProperty ExtensionProperty # Check extension property after update .

No comments:

Post a Comment

HTML

Script:

JS