Custom Teams app authentication fails after migrating Azure AD app registration to new tenant

Tomlin Izie 20 Reputation points
2025-10-22T13:05:02.2166667+00:00

I’ve been facing a similar issue to the one discussed here: Teams custom app fails authentication after switch to single tenant. In my case, the problem occurs after migrating our Teams custom app and Azure AD registration from one tenant to another.

I’ve followed the suggestions in that thread including updating the Azure AD app registration to single-tenant, re-adding redirect URIs, regenerating client secrets, and re-uploading the Teams app manifest with the new App ID but the issue persists. When the app tries to authenticate inside Teams, it shows an “unauthorized” or “invalid tenant” error.

I also cleared Teams cache, reinstalled the app, and confirmed that tokens are issued by the correct tenant, but authentication still fails only within Teams

P/s: Help me to change the tag to Teams related cuz I cant choose any of them

Microsoft Teams | Development
0 comments No comments
{count} votes

Answer accepted by question author
  1. Kudos-Ng 7,850 Reputation points Microsoft External Staff Moderator
    2025-10-22T14:04:25.5+00:00

    Hi Tomlin Izie,

    Thank you for posting your question in the Microsoft Q&A forum. 

    Based on your description, it seems you are encountering issues after migrating a Teams custom app from a multi-tenant configuration to single-tenant, with the added complexity of moving the Azure AD app registration from one tenant to another. You’ve already tried several recommended steps, but authentication still fails. To better understand the situation and assist you effectively, could you please provide more details on the following points:

    1. Error Details
      You mentioned seeing both “unauthorized” and “invalid tenant” errors. This is a bit confusing since the errors are inconsistent.
      • Could you clarify when each error occurs?
      • If possible, please test on Teams Web and use F12 DevTools (Console or Network tab) to capture any relevant request/response details.
    2. Token Retrieval
      When retrieving the token, could you confirm whether the request is targeting: https://login.microsoftonline.com/<newTenantId>/ rather than common or organizations? Checking this in the Network tab of DevTools would be helpful.
    3. Manifest Changes
      Which properties in the Teams app manifest did you update after migration?
      • Please list the changes (e.g., id, validDomains, webApplicationInfo.resource).
      • Also, share any updates made to the authentication code in your app (feel free to redact personal or tenant-specific information).
    4. App Registration Approach
      You mentioned “updating to single-tenant,” but also that you moved the Azure AD registration to a different tenant.
      • Did you create a new app registration in the new tenant as single-tenant?
      • Or did you update an existing registration from multi-tenant to single-tenant?

    Providing these details will help narrow down whether the issue is due to manifest configuration, token authority, or app registration setup.


    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.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.