

Then I run Connect-MicrosoftTeams -AadAccessToken $accessToken -MsAccessToken $token -AccountId $accountĪnd it doesn't throw an error, works properly. $body = Invoke-RestMethod -Method Post -Uri $uri -Body $body $ConnectGraph = Invoke-RestMethod -Uri "$TenatDomainName/oauth2/v2.0/token" -Method POST -Body $Body I did an app registration with the following permissionsĪnd I am authenticating against Azure AD and Graph: #Connect to Graph

I want to programatically connecto to Microsoft Teams and execute some skype for businesss online commands.Ĭonnect-MicrosoftTeam and get prompted and import my credentials, it all works perfectly, but i need to this programatically. I am running into an strange issue building a Powershell script.
