Updating Azure AD Attributes for multiple users

jr_array 1 Reputation point
2022-04-01T01:59:18.743+00:00

I'd like to update our users' Azure AD attributes in bulk. For now, we just need to update the following: Job Title, Department, Company Name, and Manager attributes. I set the CSV file with the following headers: userPrincpalName; JobTitle; Department; CompanyName; Manager. I understand that it would be better to have the manager's UPN instead of their Display Names, so I will be adding their UPN under the Manager column. I've found Powershell commands to update the non Manager attributes, but I'm having difficulty finding a solution that also updates Managers as well. The only command that worked for me was: Set-AzureADUserManager -ObjectId "User ObjectID" -RefObjectId "Manager ObjectID". In that instance, I had to use the Get-AzureADUser command to find the Object ID first. Any help with this will be greatly appreciated.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,069 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 107.3K Reputation points MVP
    2022-04-01T07:45:49.863+00:00

    That's the correct format, yes. It's not designed to be user-friendly, so you have to provide GUIDs, JSONs and what not.
    If the users in question are valid Exchange recipients, you can use the friendlier Set-User cmdlet, as follows:

    Set-User user1 -Manager user2
    

    You can use the UPN, alias, even display name to designate the users, but again, they need to be valid Exchange recipients.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.