Issue with graph API call “provision email” in private channel

Sharda Patel 5 Reputation points
2024-01-30T18:38:48.8033333+00:00

Description : We are having issue with graph API call which was working fine till week back.   We provided required consent but still getting following issue (“Forbidden”). Please see the screen shot below for more details.  Method : POST

https://graph.microsoft.com/v1.0/teams/cfbe625b-7ae4-47cc-95f0-d80e034aa4e3/channels/19:c56bca3a30a7495eb1853d5c29b11311@thread.tacv2/provisionEmail

{
    "error": {
        "code": "Forbidden",
        "message": "Forbidden",
        "innerError": {
            "code": "Forbidden",
            "date": "2024-01-30T18:37:58",
            "request-id": "290103ce-86ba-40a3-9f0f-0753f55f1c30",
            "client-request-id": "ba59f6c1-39eb-6542-87d0-29070525763a"
        }
    }
}

 

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,922 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,790 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,186 questions
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 41,126 Reputation points
    2024-01-31T02:53:56.48+00:00

    Hi @Sharda Patel

    You need to meet the following:

    • Make sure you have assigned the ChannelSettings.ReadWrite.All delegate permission to the calling app and granted administrator consent.
    • Make sure you are requesting the access token using a delegated authentication flow, such as auth code flow or ROPC flow (not recommended).
    • Make sure the logged in user is a member or owner of the team. If the logged in user is not a member or owner of the team, then make sure the user has the Group Admin/Team Admin/Global Admin role.
    • Make sure the logged in user has an Office 365 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.


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.