Forum Discussion

Nick_DS's avatar
Nick_DS
Copper Contributor
Apr 16, 2023
Solved

How to use MSgraph for different tenant

Hi, yesterday I managed to get result using this code:   Install-Module Microsoft.Graph -AllowClobber -Force Import-Module Microsoft.Graph.Users Connect-MgGraph -Scopes "User.Read.All","AuditLo...
  • VasilMichev's avatar
    Apr 17, 2023
    Use the Disconnect-MgGraph cmdlet to clear the current context, then connect anew. You might need to provide additional parameters depending on your config:

    Connect-MgGraph -ContextScope Process -ForceRefresh

Resources