Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
Hi @Brennan Phoenix
Thank you for posting your question in the Microsoft Q&A forum.
Based on your description, the issue appears to occur before SharePoint authorization, during the Managed Identity > Federated Credential > Entra application token exchange process, rather than within SharePoint or Sites.Selected permissions.
Federated identity credentials validate specific claims from the incoming Managed Identity token, including issuer (iss), subject (sub), and audience (aud). If those claims do not match the configured federated credential, Microsoft Entra ID will reject the token exchange request, even though the federated credential object, Managed Identity assignment, and SharePoint (Sites.Selected) permissions remain unchanged.
This strict claim validation is part of the workload identity federation security model.
If the claims presented in the token differ from what the federated credential expects, for example due to identity recreation, scope changes, or validation updates, authentication can fail even when no obvious configuration changes were made.
Here are some steps you may try:
-Remove the existing federated identity credential from the App Registration (not from the Managed Identity object).
-Recreate the federated credential using the VM’s Managed Identity to ensure the trust configuration aligns with the current token claims.
-Review Entra sign-in logs for AADSTS errors related to token exchange or workload identity federation.
-If deterministic stability is required, certificate-based authentication remains a mature alternative. Certificates use the OAuth 2.0 client credentials flow directly and do not depend on workload identity federation, which explains why certificate authentication continues to work as a fallback.
Reference: Overview of federated identity credentials in Microsoft Entra ID - Microsoft Graph v1.0 | Microsoft…
I hope this information is helpful.
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.