Share via

How to update user manager in bulk via MS Graph PowerShell or any other way than Azure AD PowerShell module as its going to be deprecated?

Vinod Survase 4,811 Reputation points
2024-03-28T09:40:11.7566667+00:00

How to update user manager in bulk via MS Graph PowerShell or any other way than Azure AD PowerShell module as its going to be deprecated?

Windows for business | Windows Server | User experience | PowerShell
Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Vasil Michev 127K Reputation points MVP Volunteer Moderator
    2024-03-28T18:37:49.41+00:00

    Assuming you have a CSV file with fields designating the user (UserUPN) and Manager (ManagerUPN), you can do something like this:

    Import-CSV blabla.csv | % { Set-MgUserManagerByRef -UserId $UserUPN -OdataId "https://graph.microsoft.com/v1.0/users/$ManagerUPN" }
    

    where we are using the Graph SDK for PowerShell.

    Was this answer helpful?


Your answer

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