AclCheckFailed when list chat messages via Graph API

Adão Duque 20 Reputation points
2024-04-26T15:47:03.78+00:00

I'm try to get messages from a chat ID https://learn.microsoft.com/en-us/graph/api/chat-list-messages

GET /chats/{{chatId}}/messages GET /users/{{UserId}}/chats/{{chatId}}/messages

Response:

{
    "error": {
        "code": "Forbidden",
        "message": "InsufficientPrivileges",
        "innerError": {
            "code": "1",
            "message": "AclCheckFailed-The initiator 28:app:dc3ef1-a953-4a2b-bf1... does not have permission to access thread 19:34e49e7-0e6a-4236-9a34-0f24abf0870_fd86d5e-40cc-4d65-80ec-... Tenant Id mismatch.",
            "date": "2024-04-26T14:22:48",
            "request-id": "d1dbe177-10d2-4590-bf08-fc266e99b3db",
            "client-request-id": "d1dbe177-10d2-4590-bf08-fc266e99b3db"
        }
    }
}

Thanks in advance.

Microsoft Teams Development
Microsoft Security Microsoft Graph
Microsoft Teams Microsoft Teams for business Other
{count} votes

Accepted answer
  1. AsithwMSFT 1,445 Reputation points Microsoft External Staff
    2024-04-27T20:31:55.25+00:00

    Adão Duque

    "AclCheckFailed" indicates a failure in the access control check, meaning that the requester (your application or user) does not have sufficient permission to perform the operation.

    Has user given consent for the application to retrieve chat information if the app uses delegated permissions? ( here app means "dc3ef1-a953-4a2b-bf1.." )

    Due to a tenant ID mismatch, the app might be attempting to access a different tenant’s user who hasn’t granted access to their chat information.


0 additional answers

Sort by: Most helpful

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.