SSO
8 TopicsMicrosoft Teams Bot OAuth login shows blank screen and closes without signing in
I’m building a Microsoft Teams bot using Azure AD OAuth (SSO) with Bot Framework. When I click Sign in, the OAuth popup in Teams shows a blank screen for a moment, then closes automatically without signing me in. What I’ve Done Added redirect URI in Azure App Registration: https://token.botframework.com/.auth/web/redirect Enabled Access tokens and ID tokens in App Registration → Authentication. Configured OAuth connection in Bot Channels Registration (ConnectionName matches my bot code). Verified client ID, client secret, and tenant ID are correct. Code bot.js require("dotenv").config(); const { TeamsActivityHandler } = require("botbuilder"); const { Client } = require("@microsoft/microsoft-graph-client"); const { DialogSet, DialogTurnStatus, OAuthPrompt, WaterfallDialog } = require("botbuilder-dialogs"); require("isomorphic-fetch"); const OAUTH_PROMPT = "OAuthPrompt"; const MAIN_DIALOG = "MainDialog"; class BotActivityHandler extends TeamsActivityHandler { constructor(conversationState, userState) { super(); this.conversationState = conversationState; this.userState = userState; this.dialogState = this.conversationState.createProperty("DialogState"); this.dialogs = new DialogSet(this.dialogState); // OAuthPrompt for Teams SSO this.dialogs.add( new OAuthPrompt(OAUTH_PROMPT, { connectionName: process.env.CONNECTION_NAME, text: "Please sign in to continue", title: "Sign In", timeout: 300000, }) ); this.dialogs.add( new WaterfallDialog(MAIN_DIALOG, [ this.promptStep.bind(this), this.handleFileStep.bind(this), ]) ); this.onMessage(async (context, next) => { const text = (context.activity.text || "").trim().toLowerCase(); const dialogCtx = await this.dialogs.createContext(context); if (text.startsWith("/")) { // ...handle commands... } else { const results = await dialogCtx.continueDialog(); if (results.status === DialogTurnStatus.empty) { if (context.activity.attachments?.length > 0) { await dialogCtx.beginDialog(MAIN_DIALOG, { file: context.activity.attachments[0], }); } else { await context.sendActivity("Upload a file or type /help."); } } } await next(); }); } async promptStep(stepContext) { return await stepContext.beginDialog(OAUTH_PROMPT); } async handleFileStep(stepContext) { const tokenResponse = stepContext.result; if (!tokenResponse?.token) { await stepContext.context.sendActivity("Please sign in to access files."); return await stepContext.endDialog(); } const token = tokenResponse.token; // Use token with Microsoft Graph API // ... return await stepContext.endDialog(); } } module.exports.BotActivityHandler = BotActivityHandler; Problem OAuth popup appears, then closes without completing login. No token is returned to the bot. Questions Why does the OAuth popup in Teams close immediately without signing in? Where can I see detailed error logs for OAuth failures? Azure AD sign-in logs? Application Insights (do I need to configure Instrumentation Key in Bot Service)? Environment Bot Framework v4 (Node.js) Azure Bot Service Microsoft Teams channel Azure AD v2 OAuth32Views0likes1CommentWindows Teams Outlook Powershell SSO embedded browser rendering issue
We have an issue where Teams embedded browser does not render our login page for some reason. It happened in May so may be related to Teams 05/23 release. To repro, login Windows Teams work or school with mailto:email address removed for privacy reasons It seems it cannot load some javascript from our CDN. Outlook and Powershell login on the embedded browser have the same issue, and it pops up a script error window "An error has occurred in the script on this page." with complaining below urls. https://cdn.rippling.com/rippling-frontend_platform-node_modules_rippling_lib-i18n_index_js-node_modules_rippling_supe-af9f4d.9d9e7cee5ce0d72796dc.js https://cdn.rippling.com/defaultVendors-node_modules_datadog_browser-logs_cjs_entries_main_js-node_modules_emotion_sty-f5b984.1f34d5dfdca70b475d4f.js It only happens on Windows apps with embedded browser. iOS, macOS Teams is fine. Any idea how to workaround?1.4KViews0likes5CommentsProduction deployment of MS Teams Bot and Azure AD App Registration via TeamsFx Toolkit
Hello, community! Could you please help me to solve the puzzle? I'm developing a multi-tenant SaaS teams bot which I'm going to publish to the Teams Store. This bot will support SSO, we need to get access to some of the Graph resources on behalf of the users (calendar specifically). So the default behavior of Teams Toolkit Extension for VS Code is to use two accounts for: Computing. Where all execution logic, BotService, etc will be deployed M365 account. Where the AAD App Registration is created and the teams bot is sideloaded to the specified teams account. And for the M365 account during development, the recommended way is to use Microsoft 365 Developer Program. And as far as I understand for single-tenant applications the right way is to use the account of the administrator of that tenant. We don't find any documentation on the right way to configure the TeamsFx toolkit for the multi-tenant production bot, as far as: developer account will expire in 90 days and it's non-sense to rely on the idea it will be auto-prolonged we don't need to install automatically our bot to this single-tenant as far as its purpose is to be used within any organization, not within ours. And we have multiple ideas on how to solve it: Create an M365 account for our organization and deploy the App Registration via Teams Toolkit. What's the reason we need additional account for only AAD App Registration, isn't it just another resource within Azure Cloud? Deploy everything to the single Azure Account, the same where computing occurs. Does it require us to avoid TeamsFx deployment strategy and build our own? Or there're some options to make it work out of the box? What's the recommended way and tools for multi-tenant SaaS bot with SSO production deployment ? Is there any documentation that I missed?1.2KViews0likes1CommentAccessing teams recordings through chatbot SSO
Hey Is there any method in MS Teams custom chatbot through which I can get access to MS teams meeting recording which gets saved in OneDrive. Primarily through SSO encryption inside the chatbot. The use case is to get access to the recording on OneDrive/SharePoint through a chat bot command and download it. Basically, want to automate the process of accessing OneDrive and fetching the recorded meeting with the custom chatbot. Thanks1.1KViews0likes1Commentgraph toolkit SSO without Login Component
in my teams tab i have followed the below link and authenticated Teams Tab. http://teams%20tab sso I want to able to use graph tool kit with out Login component as i have sso for tab, is it possible to do so? if so can i call the graph toolkit components3.7KViews1like15CommentsSSO for Bots in Teams (not just Tabs)
Hi all, I've watched several build 2020 sessions mentioning SSO coming for Bots in Teams. I'm fully aware of the capabilities to add SSO to Teams Tabs and how to use authentication at all with Bots. However, we desperately waiting for friction free SSO for Bots in Teams. I can't find any information on the web and I wonder if somebody knows the ETA for this feature. Thanks1.4KViews0likes1CommentWill personal accounts be able to use SSO for Teams App?
I am in the process of transitioning our apps main interactions from a web site to a Teams app. After the user installs the app, I would like them to be able to authenticate or create a new account within my service utilizing the SSO functionality. I was looking at this comparison sheet of Teams subscriptions https://www.microsoft.com/en-us/microsoft-365/microsoft-teams/free and it looks like personal accounts do not have SSO support for Microsoft Services. Is this limitation just for Microsoft services, could I still use t Microsoft as an identity provider for this user? Related, can I still get an oauth token to interact with Teams on behalf of the user?1.1KViews0likes1CommentSSO using Teams account information.
I created a TAB that uses the same login account as the one used by Teams. How can this website get the account information for Teams? The process is rough as follows: I --> login Teams --> access Tab(website) --> Tab(website) access Teams account -- > auto-login Tab(website).1.4KViews0likes4Comments