Skip to content

Azure bot app authentication #313

@QianYang0

Description

@QianYang0

Ran into 401 authentication issue when using Teams SDK to build the bot.

Context:
Teams SDK: version 2.0.5
Language: c#
Azure bot: user assigned managed identity type, deployed through app service

Issues:
token.BotFramework.come/api/userToken is always triggered no matter OAuth is configured or not. 401 returned.
This code fixed the issue: https://github.com/OfficeDev/microsoft-365-agents-toolkit/blob/b3312c4a2f02ac376a1645faf696c80c39f67851/templates/vs/csharp/default-bot/Program.cs.tpl#L14-L27

C# app authentication documentation should be updated with this code for guidance.

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