New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oauth Login stopped working in Teams(This action can't be performed since the app does not exist or has been uninstalled.) #8843
Comments
Hi @shrutinehra, I need a bit more info from you before I can begin to investigate this issue.
|
What are your development system's OS and CPU models? Windows 10 What type of bot is this, C# or Node? C# What version of Teams are you running? both web app of teams and teams app Is this the Teams app, or in a browser? Both.. SSO works in a direct line but not in teams. It does not work in Teams browser application as wells as teams app I need more details to attempt a reproduction. What else is this bot doing? Are you just trying to login to teams and that's it? Did you follow any specific samples when implementing this? https://docs.microsoft.com/en-us/composer/how-to-use-oauth?tabs=v2x Any other relevant info about your implementation that might help? sometimes it works and sometimes it does not |
I was able to reproduce this issue. I will attempt to see if any workarounds or solutions already exist. |
Do you happen to know if this is a known Teams issue or implementation pitfall? It doesn't appear to affect other channels. |
I haven't heard anything
|
Ah, I didn't install it as an app package, so perhaps that's the issue. I will try that and attempt to repro again. |
Can confirm I can repro.
@shrutinehra, Could you please provide more details as per Andrew's questions? |
@anishprasad01
I tried to use OAuthPrompt from Microsoft.Bot.Builder.Dialogs: type AuthenticationDialog(connectionName) =
inherit ComponentDialog(nameof(AuthenticationDialog))
do
base.AddDialog(OAuthPrompt(
nameof(OAuthPrompt),
OAuthPromptSettings(
ConnectionName = connectionName,
Text = "Please Sign In",
Title = "Sign In",
Timeout = 300000,
EndOnInvalidMessage = true
)
)) |> ignore
base.InitialDialogId <- nameof(OAuthPrompt) And I tried to use just OAuthCard: let client = turnContext.TurnState.Get<UserTokenClient>()
let! signInResp = client.GetSignInResourceAsync(connectionName, turnContext.Activity :?> Activity, null, ct)
let oauthCard =
OAuthCard("Please auth!",
connectionName,
List([|CardAction(ActionTypes.Signin, "Auth", text="Auth text", value=signInResp.SignInLink)|]))
oauthCard.TokenExchangeResource <- signInResp.TokenExchangeResource
let authMessage = MessageFactory.Attachment(
Attachment(ContentType = OAuthCard.ContentType,
Content = oauthCard))
log.LogInformation $"{JObject.FromObject(signInResp)}"
let! _ = turnContext.SendActivityAsync(authMessage, ct) I'm sending a sign-in action in OnMessageActivityAsync method in TeamsActivityHandler as reply for any message from an user. From the last snippet, I logged and copied the auth link from UPD: |
is the app actually installed using an app package? (not just sending a proactive message and/or talking to the bot by ID) I tried with both directly talking to bot by Id and by installing it. Same problem is the AAD app or bot registration getting re-used between a bunch of apps (common in the dev/test cycle)? No is there anything consistent about when it repro's? particular type of user maybe? No.. It's happening for every user. Is there anything consistent about when it works successfully? leaving the bot for a day after installing it did work once for me but not for other users. |
If you happen to be using Microsoft AD then in your teams manifest try adding the following two as a valid domain: |
@nikhsr I already have those in the manifest but still, the issue is there. |
@nikhsr: Does it work for you when you do this? @shrutinehra: Is this a new bot, or an existing bot that you then added SSO to? |
As mentioned in issue, I have same issue in my bot. Framework version used: 4.15.0 Issue is not relevant to whether bot is accessed by App package or accessed directly via URL. OAuth card displays this error both in Teams app and in web browser. In web browser I didn't notice any network movement after clicking "Sign in" button, so in my understanding no event is even emited to bot back. Looks like OAuth card is not working at all displaying error. I have production environment with Framework 4.9.3 and .NET Core 3.1, and OAuth card there works as expected, so issue possibly is somewhere in upgrade of Bot Framework or .NET. |
@anishprasad01 It's a new bot. |
@anishprasad01 Can you share any info so far, do you have any potential findings or estimations for this issue? |
Nothing concrete as of yet. Our investigation thus far has revealed that it doesn't seem to affect all bots, and it's not necessarily tied to the code. I tried re-deploying a bot that had this issue to a new resource, and it operated correctly. It doesn't seem to affect other channels as far as I can see, so it seems confirmed that this is localized to Teams. We'll keep looking into it, and I will hopefully have more for you as people more familiar with the Teams side of things return from the holiday break. |
That worked for me. It was an existing bot where I added SSO. |
it's resolved.... with the published app it worked fine. |
I also have this issue. The Azure app registration has both client ids used for Microsoft Teams Clients (Desktop & mobile clients + Web Clients) yet in browser client (on chrome) , teams raises this same error. |
I also have the same issue (Windows OS, Teams Client Desktop) , however it's not as concrete. On my client (using Teams to deploy with the manifest file), it works fine. 1/2 my users have this same error as above, and the other have of my users are able to get a browser login prompt with error code 53000: "The current browser is not supported, please use Microsoft Edge, Internet Explorer..." Any help is appreciated to debug this. EDIT: Some users were able to solve this problem by restarting Teams a few times (2+ times) after manually checking for updates. Not sure if this is a Teams issue or a Bot Framework issue. |
Describe the bug
SSO is not working.
Version
2.0.0
Browser
Teams
OS
To Reproduce
Steps to reproduce the behavior:
Deploy or preview using developer portal
Expected behavior
Show the pop up for log in and get token
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: