"code": "General", "message": "No Application Access Policy found for this app.", also i don't see the authentication_code, /me api is not working

achal 5 Reputation points
2023-07-04T13:38:46.27+00:00
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,268 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. CarlZhao-MSFT 39,736 Reputation points
    2023-07-05T08:31:47.8033333+00:00

    Hi @achal

    It depends on whether you are creating the online meeting on behalf of the logged-in user or another user.

    If you are creating a meeting on behalf of a logged-in user, you will be able to call the /me API to get the logged-in user's information. However, this is only available in the context of delegation, you must grant the application the delegation permission, and then use the delegated authentication flow (auth code flow or ROPC flow) to obtain an access token.

    If you are creating a meeting on behalf of another user, before doing so, you need to create an application access policy and assign the policy to the user to grant the application access to the user. Since this is an application-only context, the /me endpoint cannot be called because no user login exists for that context, you can only call the /users/{user id} endpoint to get other users' information.

    Import-Module MicrosoftTeams
    $userCredential = Get-Credential
    Connect-MicrosoftTeams -Credential $userCredential
    New-CsApplicationAccessPolicy -Identity Test-policy -AppIds "{app id}" -Description "description here"
    Grant-CsApplicationAccessPolicy -PolicyName Test-policy -Identity "{user id}"
    

    Note that whether you are creating an online meeting on behalf of a logged-in user or another user, the target user must be granted an O365 license.

    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. TH-4749-MSFT 3,295 Reputation points
    2023-07-04T14:17:32.5233333+00:00

    Hello achal,

    Thanks for reaching out. To use the OnlineMeeting endpoint you need to apply an application access policy when using application permissions. Please refer to the Permissions section in article https://video2.skills-academy.com/en-us/graph/api/onlinemeeting-get?view=graph-rest-1.0&tabs=http for more information on the topic.

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

    Thanks.