Hello @Sam Wheat,
Thank you for posting your query on Microsoft Q&A.
From my understanding, you are receiving a 403 Forbidden error when calling a method protected with RequiredScope on your API, despite confirming that the app calling the API has the correct permissions granted. To help resolve this issue, please verify the following steps:
- Ensure that the access token you are using to call the API contains the required scope. You can check this by decoding the access token and looking for the "scp" claim. The value of this claim should include the required scope.
- If the access token does not contain the required scope, check the Entra AD app registration for your app and ensure that the required scope is included in the app's API permissions.
- If the access token does contain the required scope, check your API code to ensure that the RequiredScope attribute is correctly configured. Confirm that the scope name matches the name of the scope in the access token.
- Verify that the RequiredScope attribute is correctly configured and that the Entra AD app registration for your API includes the required scope in the app's exposed scopes.
- If the above steps do not resolve the issue, please provide more details about your API and app registration configurations, as well as any error messages or logs you are seeing in the Entra Sign-in log report.
Reference Document: Verify scopes and app roles protected web API - Microsoft identity platform
Access token claims reference - Microsoft identity platform
I hope this information is helpful. Please feel free to reach out if you have any further questions.
Thanks,
Raja Pothuraju.
If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.