0

I'm trying to create a teams meeting with @microsoft/microsoft-graph-client but first it say that i have to create an access policy for my app with powershell. OK so i'm getting my app id like so:

Get-AzureADApplication

It respond me :

     ObjectId                             AppId                                DisplayName
 --------                             -----                                -----------
 37de00f1-836c-4f51-8924-1b9b6c419dbc           f7b9f9d8-3507-46dc-a596-60f437dbab87               BC Teams

So i'm using this id

New-CsApplicationAccessPolicy -Identity Test-policy -AppIds "f7b9f9d8-3507-46dc-a596-60f437dbab87" -Description "description here"

But a 404 error

New-CsApplicationAccessPolicy : Le serveur distant a retourné une erreur : (404) Introuvable.

(that's in french and it just mean server return 404 not found)

I realy need help on this i have no clue on how to fix this.

mathieu janio
  • 36
  • 1
  • 4

1 Answers1

0

Please upgrade the microsoft teams powershell module to the latest using Update-Module

Update-Module MicrosoftTeams

and Connect-MicrosoftTeams with Admin credential .

I tried doing the same and could execute command successfully

enter image description here

Note:

  1. Skype for Business Online administrators are responsible for managing policies.
  2. Skype for Business Online Admins can manage both Teams and Skype for Business Online app policies through PowerShell.
  3. Skype for Business Online Connector is currently part of the latest Teams PowerShell module.

Reference : microsoft-teams-access-policy-new-csapplicationaccesspolicy-returns-404-SO ref

kavyaS
  • 8,026
  • 1
  • 7
  • 19
  • It didn't work for me, my installation of MicrosoftTeams module is fresh and i also tryed in azure integrated terminal still have a 404. I'm thinking about user right, but it shouldn't return a 404 – mathieu janio Jun 24 '22 at 20:32
  • @mathieujanio - Could you please share your MicrosoftTeams module version and powershell version? – Nivedipa-MSFT Jun 27 '22 at 06:48
  • @Nivedipa-MSFT So for powershell: 5.1 AzureAD : 2.0.2.140 MicrosoftTeams: 4.4.1 – mathieu janio Jun 27 '22 at 10:12
  • We have tried below steps and it was working fine at our end. 1. Import-Module MicrosoftTeams $userCredential = Get-Credential Connect-MicrosoftTeams -Credential $userCredential 2.New-CsApplicationAccessPolicy -Identity Meeting-policy-dev -AppIds "xxxxx" -Description "Online meeting policy - contoso town" Grant-CsApplicationAccessPolicy -PolicyName Meeting-policy-dev -Identity "xxxxx" – Nivedipa-MSFT Jul 11 '22 at 11:59