Skip to content

Authorization denied when using MicrosoftAppCredentials for proactive messaging #501

@yashgandhi-32

Description

@yashgandhi-32

Hi team,

I have a SingleTenant Azure Bot registered in Azure Portal, with the Entra ID app set to Multitenant (accounts in any organizational directory).

Configuration:

MicrosoftAppType=SingleTenant
MicrosoftAppTenantId=
MicrosoftAppId=
MicrosoftAppPassword=

Problem:

Incoming messages work fine — CloudAdapter with ConfigurationServiceClientCredentialFactory validates and processes them correctly.

However, outgoing proactive messages fail with:

RestError: Authorization has been denied for this request.
This happens in ConversationService which uses ConnectorClient + MicrosoftAppCredentials to send birthday/anniversary notifications proactively.

Root cause I identified:

MicrosoftAppCredentials requests tokens from the /common endpoint by default, but SingleTenant bots must use the tenant-specific endpoint (login.microsoftonline.com/{tenant-id}/oauth2/token) as confirmed in this GitHub issue.

But how it will work when app is listed on teams APP store ? we are suing bot builder

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions