@Saad Alladmahi -
This issue is common when switching an Azure AD app registration from multi-tenant to single-tenant for a Teams custom app. Here’s what you need to know and how to resolve it:
Why it happens:
Teams and Azure AD may cache authentication context, tokens, and app registration metadata.
Existing users may have cached tokens or references to the old multi-tenant app, causing token acquisition to fail after the switch.
How to fix:
1.Remove the old app registration completely:
Delete or disable the previous multi-tenant Azure AD app registration if it’s no longer needed.
2.Update the Teams app manifest:
Ensure the manifest references the new single-tenant appId.
Increment the manifest version to force Teams to recognize the update.
3.Clear Teams and browser cache:
For all affected users, clear Teams desktop cache:
Quit Teams.
Delete %appdata%\Microsoft\Teams (Windows) or ~/Library/Application Support/Microsoft/Teams (Mac).
Restart Teams.
Clear browser cache if using Teams web client.
4.Reinstall the Teams app:
Uninstall the app from Teams.
Reinstall the updated app with the new manifest.
5.Consent and permissions:
Ensure admin consent is granted for all required Microsoft Graph permissions in the new single-tenant app.
Users must belong to the tenant where the app is registered.
6.Token acquisition:
Verify your authentication code uses the correct appId and tenantId.
For single-tenant apps, tokens will only be issued for users in the home tenant.
Important considerations:
- Users from other tenants will not be able to sign in to a single-tenant app.
- If you need cross-tenant access, you must use a multi-tenant app registration.
- Teams may take time to propagate manifest and app registration changes; allow up to 24 hours for full sync.
References:
- https://free.blessedness.top/en-us/microsoftteams/platform/concepts/authentication/authentication?wt.mc_id=knowledgesearch_inproduct_azure-agent-for-github-copilot
- https://free.blessedness.top/en-us/microsoftteams/teams-client-system-requirements?wt.mc_id=knowledgesearch_inproduct_azure-agent-for-github-copilot#clear-the-teams-app-cache