Share via

PowerShell's New-CsApplicationAccessPolicy not working

Anonymous
2021-06-22T22:58:54+00:00

Hi,

I am trying to use the OnlineMeetings API, but when configuring application access policy as instructed here:

https://docs.microsoft.com/en-us/graph/cloud-communication-online-meeting-application-access-policy

We got a 404 error:

New-CsApplicationAccessPolicy -Identity OnlineMeetings-Link -AppIds "xxx-xxx-xxx" -Description "xxxx Local"

Get-CsOnlineSession: /Users/xxx/.local/share/powershell/Modules/MicrosoftTeams/2.3.1/netcoreapp3.1/SfBORemotePowershellModule.psm1:63

Line |

  63 |      $remoteSession = & (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.

I am an admin of work/school account and I have done all setup prerequisites:

https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install https://docs.microsoft.com/en-us/microsoft-365/enterprise/manage-skype-for-business-online-with-microsoft-365-powershell?view=o365-worldwide

PowerShell version: 7.1.3, installed with homebrew

MicrosoftTeams module version: 2.3.1

OS: Mac Mojave 10.14.6

No firewall enabled.

What should I do to get around this issue?

Microsoft Teams | Microsoft Teams for business | Settings | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

12 answers

Sort by: Most helpful
  1. Anonymous
    2021-06-24T04:57:01+00:00

    Hi Nik,

    Thanks for your suggestion. However, as I checked I am already the admin of the school, with Teams Administrator role along with the others.

    Also, I have been using the latest version of both PowerShell (7.1) and MicrosoftTeam (2.4.0 preview), I've also tried with PowerShell 7.0 + Microsoft Teams 2.3.1 but in both cases I met the same error which is the 404 above.

    I'm thinking of something else though if this problem didn't happen to everyone else. My location is in Vietnam right now, would it be an issue, like it is being blocked from here?

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2021-06-24T01:35:12+00:00

    Also, ensure that you have e updated Microsft Teams module installed on the PowerShell:

    https://docs.microsoft.com/en-us/microsoftteams...

    Some more information:

    https://docs.microsoft.com/en-us/microsoftteams...

    Regards

    Nik

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2021-06-24T01:33:53+00:00

    Hi Hoang,

    Thanks for your post on the community forum. I'm Nik, an independent advisor here to assist you with this.

    To execute MS Teams PowerShell command, you'd need minimum Teams Administrator role on the Office 365 tenant.

    To know more about Teams admin roles and capabilities

    https://docs.microsoft.com/en-us/microsoftteams...

    In this case, you'd need to contact your IT admin and request for the Teams Administrator role to manage the Teams service, and policies.

    To know how to "Assign a user to an admin role from Active users", see https://docs.microsoft.com/en-us/microsoft-365/...

    Regards

    Nik

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2021-06-23T01:28:01+00:00

    Hi Celso,

    Thanks for your resource, it suggests me to enable permission to use the command. However, I'm quite new to this area and have no idea how to do that.

    Is there any guide I could follow?

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2021-06-22T23:52:06+00:00

    Hello, I'm Celso, Independent Advisor. Happy to be able to help you today!

    I'm sorry about what happened. Please check the link below, where right after the description there is a response that may help in your request.

    https://stackoverflow.com/questions/67601966/ha...

    Note: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.

    If after checking and still does not solve your problem please contact us again, ok

    Have a good day!

    Celso

    Was this answer helpful?

    0 comments No comments