title: Microsoft Teams access policy - New-CsApplicationAccessPolicy returns 404
body: <p>I am trying to use the Microsoft Graph API to create OnlineMeetings here
  <a href="https://docs.microsoft.com/en-us/graph/api/application-post-onlinemeetings?view=graph-rest-1.0&amp;tabs=http" rel="noreferrer">https://docs.microsoft.com/en-us/graph/api/application-post-onlinemeetings?view=graph-rest-1.0&amp;tabs=http</a></p>
  <p>But when configuring application access policy as instructed here:</p>
  <p><a href="https://docs.microsoft.com/en-us/graph/cloud-communication-online-meeting-application-access-policy" rel="noreferrer">https://docs.microsoft.com/en-us/graph/cloud-communication-online-meeting-application-access-policy</a></p>
  <p>We got a 404 error:</p>
  <pre><code>New-CsApplicationAccessPolicy -Identity OnlineMeetings-Link -AppIds &quot;xxx-xxx-xxx&quot; -Description &quot;xxxx Local&quot;      
  
  Get-CsOnlineSession: /Users/xxx/.local/share/powershell/Modules/MicrosoftTeams/2.3.1/netcoreapp3.1/SfBORemotePowershellModule.psm1:63
  
  Line |
    63 |      $remoteSession = &amp; (Get-CsOnlineSessionCommand)
       |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       | The remote server returned an error: (404) Not Found.
  
  Invoke-Command: /Users/xxx/.local/share/powershell/Modules/MicrosoftTeams/2.3.1/netcoreapp3.1/SfBORemotePowershellModule.psm1:22959
  
   Line |
  22959 |  …    -Session (Get-PSImplicitRemotingSession -CommandName 'New-CsApplic …
        |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        | Cannot validate argument on parameter 'Session'. The argument
        | is null or empty. Provide an argument that is not null or
        | empty, and then try the command again.
  </code></pre>
  <p>I am an admin of the work/school account, and I have done all setup prerequisites:</p>
  <p><a href="https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install" rel="noreferrer">https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install</a>
  <a href="https://docs.microsoft.com/en-us/microsoft-365/enterprise/manage-skype-for-business-online-with-microsoft-365-powershell?view=o365-worldwide" rel="noreferrer">https://docs.microsoft.com/en-us/microsoft-365/enterprise/manage-skype-for-business-online-with-microsoft-365-powershell?view=o365-worldwide</a></p>
  <p>I have all admin permissions to perform PowerShell cmdlet:</p>
  <p><a href="https://i.stack.imgur.com/3NXYq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3NXYq.png" alt="Microsoft Permissions" /></a></p>
  <p><strong>Environment:</strong></p>
  <pre><code>PowerShell version: 7.1.3, installed with homebrew
  MicrosoftTeams module version: 2.3.1
  OS: Mac Mojave 10.14.6
  </code></pre>
  <p>I have no firewall, VPN/proxy enabled. The same issue happens when I tried it in the default PowerShell of Windows 10 VM on VirtualBox.</p>
  <p>What should I do to get around this issue?</p>