I've created a Bot in MS teams that can authenticate the user against AAD. I've used the AuthBot code for this. This works correctly. I have questions regarding further improving the sign-in experience. The Bot currently opens up a web browser, the user logs in and is redirect to a page with a magic number that he or she needs to copy-paste back into teams.
If I understand the Authentication section on this page correctly, then the following should be possible:
- The browser window can be opened inside of Teams instead of through the browser by specifying a validDomains attribute in the Teams package manifest file. However, I chat with the Bot 1:1 and it doesnt seem to use the manifest file (the Bot's image doesnt use the one from the manifest). How do I get the login window to open inside Teams?
- There is a MS Teams javascript file. Can I use this (on the page that my Bots shows after authentication) to redirect the user back to teams, and possibly automatically paste the magic number into the chat with the Bot?