Forum Discussion
Nick_DS
Apr 16, 2023Copper Contributor
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...
- Apr 17, 2023Use 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
Thiraviam5316
Aug 04, 2023Brass Contributor
Nick_DSIt seems that you have used the "Select-MgProfile" cmdlet to select the beta profile. However, in the updated Graph PowerShell module, you can't use "Select-MgProfile" anymore. Instead, you need to install a separate module for accessing the beta cmdlets. For more details regarding this, please refer to:
https://m365scripts.com/microsoft365/install-microsoft-graph-beta-module-discover-the-benefits/