Reputation: 545
I have a requirement to setup users in MS Teams from a 3d party portal Client is using Direct Voice option and it needs to allocate phone numbers to users from their VoIP portal.
I have found that MS is providing a set of PowerShell cmdlets that allows to assign phone numbers , enable enterprise voice and so on.
In VOIP Provider Azure portal I have setup an app in Entra ID and assigned the required permissions
On the client side , I have consented the Provider App .
I have followed the Token authentication from this official MS Page : https://learn.microsoft.com/en-us/MicrosoftTeams/teams-powershell-application-authentication
however, I can't use any of Microsoft Teams cmdlets(Get-CSOnlineUSer) neither I can call any MS team API (Ex: https://api.interfaces.records.teams.microsoft.com/Teams.VoiceApps/callqueues)
I am getting back : PS- The remote server returned an error: (401) Unauthorized.
or from API { "code": "Unauthorized", "message": "Invalid credential", "action": "Provide valid credential." } What Am I missing in setting up the Entra ID app ? The only way it works is when I only login with a real admin user on client's Azure P.S. : I used examples from this page : https://www.christianfrohn.dk/2022/11/13/connect-to-microsoft-teams-powershell-using-azure-app-reg-service-principal/#more-361 still no luck .
Upvotes: 0
Views: 43