Application access policy on Mail.read

Surachita M 0 Reputation points
2025-07-24T12:11:00.2733333+00:00

I have an app which reads emails from mailbox using Microsoft Graph api. I added the Mail.read application permission for my app to access the emails. For restricting access to specific shared mailbox, I added RestrictAccess policy. Policy is granted. But my app is not able to access the specified mailbox. Below command was executed from powershell. New-ApplicationAccessPolicy -AppId "<AppId>" -PolicyScopeGroupId "<SecurityGroup>" -AccessRight RestrictAccess -Description "Restrict app to shared mailbox". Kindly advise.

Microsoft 365 and Office | Development | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Gabriel-N 3,705 Reputation points Microsoft External Staff Moderator
    2025-07-24T12:49:36.9833333+00:00

    Hi Surachita M

    Thank you for reaching out via the Microsoft Q&A forum regarding the issue with accessing a shared mailbox using your application through Microsoft Graph API.

    Please review your configuration using the official documentation available at New-ApplicationAccessPolicy - Microsoft Docs. This article outlines the correct usage of the New-ApplicationAccessPolicy cmdlet and the necessary permissions.

    You may also find useful insights and troubleshooting suggestions in this Tech Community thread: Can't access shared mailbox through API even after granting permissions.

    Please recheck your Conditional Access policies to ensure that the security group used in your policy is excluded from any restrictions that might block access for service principals or Graph API calls. For more details on how device filters and conditions may affect access, please refer to Conditional Access: Filter for devices

    Could you kindly provide a screenshot of the error notification you’re encountering when the app attempts to access the mailbox? This will help us better understand the issue and provide more targeted assistance.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Image preview


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.