A cloud-based identity and access management service for securing user authentication and resource access
Hello Ian Cooke,
As discussed offline, Reading 1:1 chat messages within your tenant now works with application permissions (Chat.ReadWrite.All), as you confirmed.
For sending messages, you have implemented delegated auth using the OAuth Authorization Code flow where each user signs in once, store their tokens, and messages send as the user.
Regarding the group chat that was originally failing with 403 AclCheckFailed this was a cross-tenant chat. The participants include members from both tenants. As Application permissions are scoped to the app's home tenant, so accessing chats with external tenant participants is not possible.
Granted Chat.ReadWrite.All Application type API permission to the Microsoft Entra ID application:
Generated access token using client credential flow:
Make sure to generate the scope as https://graph.microsoft.com/.default
Using the above token, I am able to successfully call the API:
GET https://graph.microsoft.com/v1.0/chats/ChatID/messages