botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

bug: ServerError: unauthorized_client: 700016

Open jaymitchell opened this issue 1 year ago • 4 comments

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

  • [ ] PR
  • [ ] Merged

Javascript SDK TODO

  • [ ] PR
  • [ ] Merged

Python SDK TODO

  • [ ] PR
  • [ ] Merged

Java SDK TODO

  • [ ] PR
  • [ ] Merged

Samples TODO

  • [ ] PR
  • [ ] Merged

Docs TODO

  • [ ] PR
  • [ ] Merged

Tools TODO

  • [ ] PR
  • [ ] Merged

cc @smtlaissezfaire

jaymitchell avatar Jul 30 '24 20:07 jaymitchell

@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.

stevkan avatar Aug 01 '24 22:08 stevkan

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 avatar Aug 02 '24 16:08 smtlaissezfaire

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)?

smtlaissezfaire avatar Aug 05 '24 23:08 smtlaissezfaire

@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 avatar Aug 16 '24 20:08 stevkan

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

stevkan avatar Aug 30 '24 23:08 stevkan