
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.