First step you need to do is Install the Microsoft Graph PowerShell SDK :
Run the following command to install the SDK in PowerShell Core or Windows PowerShell:
After the installation is completed, you can verify the installed version with the following command :
You can update the SDK and all of its dependencies using the following command :
Using Find-MgGraphCommand to find required permissions , for this example for Get-MgUser :
Use the Connect-MgGraph command to sign in with the required scopes. You'll need to sign in with an admin account to consent to the required scopes :
you can locate the signed-in user and get their user ID. You'll need that to use as a parameter to the other commands you'll use later. Start by running the following command:
Now use the user's ID as a parameter to the Get-MgUserJoinedTeam command :
List the user's joined teams :
We can do a lot of cool things with Graph API ..
Comments