Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs
Hi @Craig Noll
Thank you for posting your question in the Microsoft Q&A forum.
Please note that our forum is a public platform, and we will modify your question to hide your personal information in the description. Kindly ensure that you hide any personal or organizational information the next time you post an error or other details to protect personal data.
Based on your description and screenshots, the issue comes from a mismatch between the application type and the OAuth scope configuration.
With the following configuration:
MicrosoftAppType=MultiTenant
MicrosoftAppOAuthScope=https://api.botframework.com/.default
the SDK requests a token for the Bot Framework resource (https://api.botframework.com). Azure AD then attempts to resolve the application in the Bot Framework tenant, but your app registration exists only in your own tenant. Because of this, Azure cannot locate the resource and returns: AADSTS500011: The resource principal named <app> was not found in the tenant named Bot Framework.
Here are correct configurations:
1.Single tenant app
MicrosoftAppType=SingleTenant
MicrosoftAppOAuthScope=https://api.botframework.com/.default
This configuration works because Azure AD issues a token for the Bot Framework resource using the credentials from your tenant.
2.Multi-tenant app
MicrosoftAppType=MultiTenant
MicrosoftAppOAuthScope=api://<AppClientID>/.default
In this scenario, the token is requested for your own application resource rather than the Bot Framework resource.
Required configuration steps in Microsoft Entra ID:
-Set Supported account types to Accounts in any organizational directory.
-Configure an Application ID URI, for example: api://<AppClientID>
-Expose at least one scope.
This allows Azure AD to resolve the resource in the tenant where the application registration exists.
When the bot is installed in other tenants, administrator consent must be granted so the service principal is created in those tenants.
Note: Multi-tenant bots with custom scopes are an advanced scenario and may have limitations with some Bot Framework features.
I hope this helps.
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.