How to write the command? [Grant-CsApplicationAccessPolicy -PolicyName Test-policy -Identity "748d2cbb-3b55-40ed-8c34-2eae5932b22a"]

Hari Haran A 65 Reputation points
2023-05-02T13:04:22.5333333+00:00

What is -PolicyName Test-policy -Identity ?

All Experts can Please give me the correct Explaination.

I changed only the client user Id After I run it.

they shows error. Correct Command Are not placed

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,171 questions
Windows for business Windows Server User experience PowerShell
Microsoft Security Microsoft Entra Microsoft Entra ID
Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 46,371 Reputation points
    2023-05-03T03:10:33.08+00:00

    Hi @Hari Haran A

    Follow the steps below:

    1.Install Microsoft Teams PowerShell Module.

    Install-Module -Name MicrosoftTeams -Force -AllowClobber
    

    2.Import the Teams module and connect to Microsoft Teams using an admin user with an O365 license.

    Import-Module MicrosoftTeams
    $userCredential = Get-Credential
    Connect-MicrosoftTeams -Credential $userCredential
    

    3.Create an application access policy for your app.

    New-CsApplicationAccessPolicy -Identity Test-policy -AppIds "{app id}" -Description "description here"
    

    4.Grant the policy to the user.

    Grant-CsApplicationAccessPolicy -PolicyName Test-policy -Identity "{user object id}"
    

    用户图像

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.