microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.47k stars 2.44k forks source link

bug: ServerError: unauthorized_client: 700016 #6658

Closed jaymitchell closed 1 week ago

jaymitchell commented 1 month ago

Version

4.22.1

Describe the bug

(Copied from https://github.com/OfficeDev/teams-toolkit/issues/12101)

Seeing this consistently with a production bot when trying to get teams members.

{"code":"Internal","message":"ServerError: unauthorized_client: 700016 - [2024-07-29 21:49:58Z]: AADSTS700016: Application with identifier '[redacted]' was not found in the directory 'Bot Framework'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant. Trace ID: [redacted] Correlation ID: [redacted] Timestamp: 2024-07-29 21:49:58Z - Correlation ID: [redacted] - Trace ID: [redacted]"}

Happy to provide correlation id etc or whatever is needed to debug on your end.

The bot is running in multitenant mode, so not sure why I'd be getting this error.

Note, staging works just fine in a test teams instance.

To Reproduce

Expected behavior

Screenshots

Additional context

Tracking Status

Dotnet SDK [TODO]()

Javascript SDK [TODO]()

Python SDK [TODO]()

Java SDK [TODO]()

Samples [TODO]()

Docs [TODO]()

Tools [TODO]()

cc @smtlaissezfaire

stevkan commented 1 month ago

@jaymitchell - Were you able to test the possible solutions posted in the Stack Overflow issue, microsoft-bot-framework-bot-missing-from-bot-framework-tenant-how-to-add? I'm assuming you have, but thought I'd check.

smtlaissezfaire commented 1 month ago

Hi @stevkan, I'm working with @jaymitchell.

For the first answer - We aren't using azure; we are self hosting; For the second, not sure how it applies.

We could try recreating the bot with complete new IDs though.

smtlaissezfaire commented 1 month ago

Ok, I think we found your suggestion @stevkan, thank you.

But do we need to through publisher verification to install the bot / app? (under Branding + Properties) - that is, verifying our domain and going through Microsoft Partner network verification (MPN)?

stevkan commented 3 weeks ago

@smtlaissezfaire - thank you for your patience. Were you able to get this working?

As for your question regarding MPN verification, the short answer is I don't know. If you are still trying to figure this out, let me know and I will try ask around. As for my suggestion, I must apologize as it seems I wasn't very clear which "solution" I was referring to since there are several options presented. Can you tell me which one you landed on?

stevkan commented 1 week ago

Closing due to inactivity. Please feel free to reopen if the issue persists or you have new details to share.