Forum Discussion

integrationsn's avatar
integrationsn
Copper Contributor
Oct 15, 2025

Bot creation failed

When i tried to create a bot in dev.teams.microsoft.com i am getting the below error

{
    "resultType": 2,
    "result": null,
    "errorMessage": "When using this permission, the backing application of the service principal being created must in the local tenant"
}

can anyone help me with this
Microsoft Teams​ 

6 Replies

  • Hello Kamen,

    We have tested the scenario on both the Old and New Developer Portals, and it is working as expected from our end.

    https://github.com/user-attachments/assets/50e94b1b-bd44-4e24-ace3-6bdb65462104
    https://github.com/user-attachments/assets/9f185254-7292-4b3b-986c-ee046527655d

    The portal gets stuck if it cannot create the bot registration or link it to an Azure AD app, often due to tenant restrictions, missing permissions, or backend service issues.
    Sometimes, the portal does not surface the actual error (often a 403 or service principal creation failure).

    • Kamen's avatar
      Kamen
      Copper Contributor

      Hi, maybe it was a problem on Wednesday. On Thursday, I was able to create my bot. Anyway, I find the initial error message to be completely misleading, as it is appears it is just a backend service issue and nothing related with tenant restrictions or permissions. 

  • Hello integrationsn, This error means the Teams Developer Portal is trying to create a bot registration (service principal) in your tenant, but the backing Azure AD application is not in your local tenant. Microsoft recently tightened tenant restrictions for bot creation.

    Previously, the Developer Portal allowed bot registrations even if the backing Azure AD app was not in the same tenant. This behavior has now changed — Microsoft requires the app to be created and registered within the same tenant where the bot is being deployed.

    • Kamen's avatar
      Kamen
      Copper Contributor

      I have the same experience as above. Today I have created my initial application via Azure, and then with the same account, via the Developers' portal in Teams, I am trying to create an additional bot application for one of my tabs in the initial application. If I check in Azure, I could see this additional bot application created, however, in the Developers' portal in Teams I am getting the same error as above, plus I cant select those additional application I could see in Azure. My understanding is that in this case everything is happening in one tenant. 

    • Kamen's avatar
      Kamen
      Copper Contributor

      I have the same experience as the above mentioned. I have created my initial application via Azure, and then with the same account via the Developers' portal in Teams, I am trying to create this additional bot application for one of my tabs in the initial application. If I check them in Azure, I could see the newly created bot application, but I can't select via the Developers' portal in Teams. My understanding all this is happening in the same tenant. 

Resources