Microsoft Graph API Error 403 when requesting List conversations

Johnny Gabritchidze 20 Reputation points

I am trying to write a Python script in Jupyter Notebook to connect to the Graph API on behalf of the user. I have successfully managed to acquire access token and retrieved List groups. When I try to request "/groups/{id}/conversations" code returns error.
What I done:
Created App on Azure Directory

  1. Given below permissions
    Delegated and Application Permission: Group.Read.All
  2. Given admin consent
  3. Got the Access token using MSAL:
    scopes = ['']

Create a PublicClientApplication instance

app = PublicClientApplication(client_id, authority=f'{tenant_id}')

Start the Device Code Flow

result = app.initiate_device_flow(scopes=scopes)

token = app.acquire_token_by_device_flow(result)

access_token = token['access_token']

  1. Received access token from above API
  2. Retrieved List groups.
  3. When sending request on this endpoint "{id}/conversations"
    I getting error:
Error: 403 - {"error":{"code":"ErrorAccessDenied","message":"Access is denied. Check credentials and try again., User 'user_id' not authorized to access group 'group_mail'. Reason: '(0xD10)'."}}

User is Global admin.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,174 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 32,126 Reputation points

    Hi @Johnny Gabritchidze

    This issue has nothing to do with permissions, the logged in user must be the owner of the group to retrieve the list of conversations in the group.

    User's image

    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.

0 additional answers

Sort by: Most helpful