The error message indicates that your application is being blocked by a tenant-configured Application Access Policy. This typically happens when the policy restricts access to certain resources or APIs for specific applications. Here's how you can resolve it:
-
Check Application Access Policy:
-
Use the Exchange Online PowerShell module to review the current Application Access Policies.
-
Run the following command to list the policies:
-
Identify if your application is being restricted by any policy.
-
-
Modify or Remove the Policy:
-
If the policy is unnecessarily restrictive, you can modify it to allow your application access.
-
Use the
New-ApplicationAccessPolicyorRemove-ApplicationAccessPolicycmdlets to adjust the settings. For example:
-
-
Verify Permissions:
-
Ensure that your application has the required permissions in Azure Active Directory. For example, if you're using Microsoft Graph API, verify that the necessary permissions (like
Mail.Read,Calendars.Read, etc.) are granted.
-
-
Test the Application:
-
After making changes, test your application to confirm that the error is resolved.
-
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article