How to Restrict Microsoft Graph API Chat Access to Only Chats Involving a Specific User (User1)?

Anonymous
2025-07-11T08:55:10+00:00

Hi Community,

I’m working on a Teams integration using the Microsoft Graph API at the service principal (app-only) level. I’m using the following endpoint to read chat messages:

GET https://graph.microsoft.com/v1.0/chats/{chat-id}/messages

MY Goal: 

I want to restrict access so that the app can only read messages from chats involving a specific user (User1). For example:

  • ✅ Chats between User1 and User2
  • ✅ Chats between User1 and User3
  • ❌ But not chats between User2 and User3

Current Concern:

Using Chat.Read.All gives access to all chats in the tenant, which I want to avoid due to security and privacy concerns.

My Questions:

  1. Is there a way to restrict Graph API access to only chats where User1 is a participant?
  2. Can this be achieved using Resource-Specific Consent (RSC) permissions?
  3. Is there any better approach or best practice to meet this requirement securely?

Any help, documentation references, or examples would be much appreciated.

Thanks in advance!

Microsoft Teams | Microsoft Teams for business | Settings | Privacy

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2025-07-11T12:43:25+00:00

    Hi 

    Thank you for reaching Microsoft Community 

    I'm sorry, but restricting Microsoft Graph API chat access involves advanced Azure AD and Graph configurations that are outside my current scope of expertise. To ensure you receive the most accurate and detailed guidance, I recommend posting your question on the Microsoft Tech Community at https://techcommunity.microsoft.com/. There, you’ll find experts and community members who specialize in Microsoft Graph and Teams configurations and can provide tailored solutions for your specific scenario. 

    Meanwhile, considering that some of the feature requested cannot be achieved in Microsoft Graph API currently, I'd recommend you share your valuable feedback about the feature in Microsoft Graph · Community. The Product Team is in-charge of the feedback site, and they are constantly checking the comments and feedback from our customer 

    Thank you for your understanding, and I hope you find the support you need! 

    Best regards,  

    Allison  - MSFT | Microsoft Community Support Specialist.

    Was this answer helpful?

    0 comments No comments