Not able to sign in after publishing bot. I am using bot-authentication-msgraph
I am using bot-authentication-msgraph
for authentication in my bot using python. The bot works fine when tested in the Test in Web Chat feature. However, after publishing it to the Teams channel, the sign-in dialog box shows an error: "Something went wrong. Please try again."
It seems like after publishing, the redirect URL (https://token.botframework.com/.auth/web/redirect
) is not working correctly in Teams. Please assist in resolving this issue.
Result in Test in Web Chat
Result in Teams after publishing bot service
Azure AI Bot Service
Microsoft Teams
Microsoft Authenticator
Microsoft Teams Development
-
Sayali-MSFT • 3,841 Reputation points • Microsoft External Staff
2025-02-14T06:03:40.65+00:00 @Shweta Shinde,
Thank you for your inquiry about your Teams app development issue! To assist you better, could you please provide the following details?Documentation Links: Any specific documentation you followed that relates to your problem.
Teams Client Version: What version of the Teams client are you using?
Code Snippets: Relevant code snippets that illustrate the issue.
Manifest Package: please share the manifest package for your app.
This information will help us better understand the situation and provide a more accurate response.
-
Robin Sheng-MSFT • 6,610 Reputation points • Microsoft External Staff
2025-02-14T06:10:38.93+00:00 Hi @Shweta Shinde
Just checking in to see if above information was helpful. If the reply is helpful to you, please try to mark it as an answer to help others who encounter the same issue and read this thread. If you have any further updates on this issue, please feel free to post back. -
Shweta Shinde • 0 Reputation points
2025-02-14T08:00:35.66+00:00 @Sayali-MSFT This URL I referred for manifest file https://learn.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema The client version is 49/25010620412. this is my manifest. Json file
{ "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.19/MicrosoftTeams.schema.json", "manifestVersion": "1.19", "version": "1.0.0", "id": "BOT-ID", "developer": { "name": "USTBOT", "websiteUrl": "https://example.com/", "privacyUrl": "https://example.com/privacy", "termsOfUseUrl": "https://example.com/app-tos", "mpnId": "1234567890" }, "name": { "short": "USTBOT", "full": "Represents the chatbot functionality." }, "description": { "short": "AI-powered Zoho-integrated bot for HR and employees' queries.", "full": "USTBOT is an AI-powered chatbot integrated with Zoho API, designed to assist HR and employees with instant answers to queries like leave balance, attendance, and more. It streamlines workforce management, improves efficiency, and ensures quick access to essential HR data. With seamless integration, USTBOT enhances employee engagement by providing real-time responses, reducing manual effort, and optimizing HR operations. Whether it's checking policies, tracking requests, or managing HR workflows, USTBOT simplifies the process, making HR interactions smarter and faster. 🚀" }, "icons": { "outline": "outline.png", "color": "color.png" }, "accentColor": "#FFFFFF", "configurableTabs": [ { "configurationUrl": "https://contoso.com/teamstab/configure", "scopes": [ "team", "groupChat" ], "canUpdateConfiguration": true, "context": [ "channelTab", "privateChatTab", "meetingChatTab", "meetingDetailsTab", "meetingSidePanel", "meetingStage" ], "sharePointPreviewImage": "Relative path to a tab preview image for use in SharePoint — 1024px X 768", "supportedSharePointHosts": [ "sharePointFullPage", "sharePointWebPart" ] } ], "staticTabs": [ { "entityId": "unique Id for the page entity", "scopes": [ "personal" ], "context": [ "personalTab", "channelTab" ], "name": "Display name of tab", "contentUrl": "https://contoso.com/content (displayed in Teams canvas)", "websiteUrl": "https://contoso.com/content (displayed in web browser)", "searchUrl": "https://contoso.com/content (displayed in web browser)" } ], "supportedChannelTypes": [ "sharedChannels", "privateChannels" ], "bots": [ { "botId": "BOT-ID", "scopes": [ "team", "personal", "groupChat" ], "needsChannelSelector": false, "isNotificationOnly": false, "supportsFiles": true, "supportsCalling": false, "supportsVideo": true, "commandLists": [ { "scopes": [ "team", "groupChat" ], "commands": [ { "title": "Command 1", "description": "Description of Command 1" }, { "title": "Command 2", "description": "Description of Command 2" } ] }, { "scopes": [ "personal", "groupChat" ], "commands": [ { "title": "Personal command 1", "description": "Description of Personal command 1" }, { "title": "Personal command N", "description": "Description of Personal command N" } ] } ] } ], "connectors": [ { "connectorId": "GUID-FROM-CONNECTOR-DEV-PORTAL%", "scopes": [ "team" ], "configurationUrl": "https://contoso.com/teamsconnector/configure" } ], "composeExtensions": [ { "canUpdateConfiguration": true, "botId": "BOT-ID", "commands": [ { "id": "exampleCmd1", "title": "Example Command", "type": "query", "context": [ "compose", "commandBox" ], "description": "Command Description; e.g., Search on the web", "initialRun": true, "fetchTask": false, "parameters": [ { "name": "keyword", "title": "Search keywords", "inputType": "choiceset", "description": "Enter the keywords to search for", "value": "Initial value for the parameter", "choices": [ { "title": "Title of the choice", "value": "Value of the choice" } ] } ] }, { "id": "exampleCmd2", "title": "Example Command 2", "type": "action", "context": [ "message" ], "description": "Command Description; e.g., Add a customer", "initialRun": true, "fetchTask": false , "parameters": [ { "name": "custinfo", "title": "Customer name", "description": "Enter a customer name", "inputType": "text" } ] }, { "id": "exampleCmd3", "title": "Example Command 3", "type": "action", "context": [ "compose", "commandBox", "message" ], "description": "Command Description; e.g., Add a customer", "fetchTask": false, "taskInfo": { "title": "Bot", "width": "medium", "height": "medium", "url": "https://example.com/" } } ], "messageHandlers": [ { "type": "link", "value": { "domains": [ "mysite.someplace.com", "othersite.someplace.com" ], "supportsAnonymizedPayloads": false } } ] } ], "permissions": [ "identity", "messageTeamMembers" ], "devicePermissions": [ "geolocation", "media", "notifications", "midi", "openExternal" ], "validDomains": [ "thirdeyedata.ai", "learningpath.ai", "onthirdeye.com" ], "webApplicationInfo": { "id": "BOT-ID", "resource": "api://BOT-ID" }, "authorization": { "permissions": { "resourceSpecific": [ { "type": "Application", "name": "ChannelSettings.Read.Group" }, { "type": "Delegated", "name": "ChannelMeetingParticipant.Read.Group" } ] } }, "showLoadingIndicator": false, "isFullScreen": false, "activities": { "activityTypes": [ { "type": "taskCreated", "description": "Task created activity", "templateText": "<team member> created task <taskId> for you" }, { "type": "userMention", "description": "Personal mention activity", "templateText": "<team member> mentioned you" } ] }, "defaultBlockUntilAdminAction": true, "publisherDocsUrl": "https://example.com/app-info", "defaultInstallScope": "meetings", "defaultGroupCapability": { "meetings": "tab", "team": "bot", "groupchat": "bot" }, "configurableProperties": [ "name", "shortDescription", "longDescription", "smallImageUrl", "largeImageUrl", "accentColor", "developerUrl", "privacyUrl", "termsOfUseUrl" ], "subscriptionOffer": { "offerId": "publisherId.offerId" }, "meetingExtensionDefinition": { "scenes": [ { "id": "9082c811-7e6a-4174-8173-6ccd57d377e6", "name": "Getting started sample", "file": "scenes/sceneMetadata.json", "preview": "scenes/scenePreview.png", "maxAudience": 15, "seatsReservedForOrganizersOrPresenters": 0 }, { "id": "afeaed22-f89b-48e1-98b4-46a514344e4a", "name": "Sample-1", "file": "scenes/sceneMetadata.json", "preview": "scenes/scenePreview.png", "maxAudience": 15, "seatsReservedForOrganizersOrPresenters": 3 } ] } }
Please reply as soon as possible
-
Sayali-MSFT • 3,841 Reputation points • Microsoft External Staff
2025-02-14T09:43:10.2166667+00:00 Hi @Shweta Shinde, Thanks for sharing the details. We will check this from our end and keep you updated.
However, if you have any business-critical issue which need immediate attention, please raise a support request here: https://docs.microsoft.com/en-us/microsoft-365/admin/get-help-support?view=o365-worldwide&tabs=online
-
Sayali-MSFT • 3,841 Reputation points • Microsoft External Staff
2025-02-14T17:31:54.3633333+00:00 Hi @Shweta Shinde, Could you please check the steps and confirm if you have completed all of them?
https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-sso-adaptivecard/csharp/BotSsoAdaptivecard#1-setup-for-bot -
Shweta Shinde • 0 Reputation points
2025-02-17T08:46:01.9966667+00:00 Hi @Sayali-MSFT
I followed your guidance and steps. Now, I can see a screen similar to a browser where we receive the OTP for authentication. However, after that, I’m getting the error: "Unable to reach app. Please try again."Can you please suggest what I need to change?
also, I checked bot in browser instead off team's app and do inspect it giving me this error
-
Sayali-MSFT • 3,841 Reputation points • Microsoft External Staff
2025-02-17T08:59:46.59+00:00 Hi @Shweta Shinde, The error "Unable to reach app. Please try again." suggests there may be an issue with the app or bot configuration, particularly related to authentication and endpoint accessibility. Kindly ensure that the bot is correctly managing the OAuth flow and handling tokens properly.
Please verify the token exchange process to confirm that the tokens are valid and not expired. Additionally, checking the logs of your bot service may help identify any error messages or exceptions occurring when the bot is accessed.
Some common causes of this issue include authentication errors, misconfigured endpoints.
-
Shweta Shinde • 0 Reputation points
2025-02-17T09:26:29.2533333+00:00 @Sayali-MSFT Can you tell me where I have to check and what in detail.
-
Sayali-MSFT • 3,841 Reputation points • Microsoft External Staff
2025-02-19T08:45:11.9333333+00:00 Hi @Shweta ShindePlease check the Bot Configuration, Bot OAuth connection, and the token exchange URL.
-
Shweta Shinde • 0 Reputation points
2025-02-19T08:59:55.7133333+00:00 @Sayali-MSFT I checked this one as well, It's not working
-
Sayali-MSFT • 3,841 Reputation points • Microsoft External Staff
2025-02-20T07:48:47.4866667+00:00 Hello @Shweta Shinde, Could you please share Teams Client logs:
https://learn.microsoft.com/en-us/microsoftteams/log-files#log-collection
Sign in to comment