Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

Login does not work in Teams #149

Open
Rambalac opened this issue Nov 9, 2017 · 2 comments
Open

Login does not work in Teams #149

Rambalac opened this issue Nov 9, 2017 · 2 comments

Comments

@Rambalac
Copy link

Rambalac commented Nov 9, 2017

Authentication Required button opens page which shows

Almost done! Please copy this number and paste it back to your chat so your authentication can complete:
123456

But copying that number gives.
I'm sorry but I couldn't validate your number. Please try authenticating once again.

Looks like problems is in formating. Bot is not cleaning input string properly.
So solution could be either proper cleaning or removing formating from login page.

And I dont understand why you don't send that token directly to bot. You could save latest login conversation, put bot userid into azure auth redirect url and and then on post from azure send response to saved conversation.

@nzthiago
Copy link
Member

nzthiago commented Nov 9, 2017

It's a bug we've seen before, it's a problem on the Teams channel and how they format it when you copy and paste - does it work if you simply type the numbers in without copying and pasting?

See the "Verifying user identity using the 'magic number'" section in the following link for the question on why not send the token directly to the bot:
https://docs.microsoft.com/en-us/bot-framework/bot-design-pattern-integrate-browser

That is, it's important when the bot is in a channel with multiple users, to help match a user to their token. For example, in a team chat:

  • You include the bot.
  • I want to connect to Azure, and the logon button shows up, associated with my user id.
  • But instead you click on it and enter your credentials for Azure.
  • That means after you authorize the bot would have my user id and your oauth token. That is, your oauth token is set in my userdata, by mistake of course.
  • Now I can use the bot to connect to all your Azure subscriptions, etc.

Note that there is no new work being done with this bot and it was created as a sample, but we still leave it running for people that want to use it. It'll most likely be discontinued in the next few months.

@Rambalac
Copy link
Author

Rambalac commented Nov 9, 2017

You can do it at least if login is called in personal chat. Or if login is used in group chat send button to private chat and in group chat post message like "Please press button in bot's personal chat".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants