How to Get User Data from Microsoft Teams Bot Just Once - botframework

My web app bot is installed in Teams as an app. (Only in my company(AD) ) Now, I want to fetch users' information such as email, name etc... I don't want to send oauth card again and again to users.
Is there any solution which provides fetching users' (team members') information? Can you please share all setups in Azure AD and Bot framework?
Thanks!

Related

Way for Teams App to have dynamic bot configuration

I am building a Teams App with Bot functionality for proactive messaging targeting single tenants, however I would like to have the bot published in the public marketplace so that users can install it from the marketplace instead of sideloading to their teams. The bot resources and code will be dynamically created on the tenant's azure.
Is there a way for me to have the bot id on the marketplace be dynamic depending on who installed it?
By default the bot is multitenant application. You can use the same bot Id across different tenants.

How to install a bot to microsoft teams (nodejs)

Recently I have created a bot for microsoft teams. I have installed it to my teams successfully.But is there any way where all my organization users can install app by clicking on a single link that is displayed in my web page. For example like (authenticating slack bots, similarly like google auth). and I need to store the teams details of every user so that my bot can send messages to them.
If you want to give a link to install the app inside teams from an external webpage, you could do that using Deeplink to app installation. Here's the format of the link https://teams.microsoft.com/l/app/YourAppId. You could also add the app to your tenant app catalaog(Your organisational store) and all the members of your organisation can install the app from there.

LUIS deployed through SharePoint - How to get user data?

We have deployed LUIS V4 in our Azure Platform, and made it available to our employee through SharePoint. It is currently open and does not need log in to be used.
We would like to capture information about who the person interacting with the bot is; is there any way that information related to the user can be retrieved? (employees to use the bot must be authenticated to Azure as it is within a SharePoint, but the bot doesn't require authentication as mentioned)
Thank you!
If you are just using LUIS, then no, it does not do any user specific tasks. It only translates an utterance (phrase) into specific actions (intents and entities), also does not store any state.
So all authorisations and user customisations need to be done outside of LUIS, with plain code. If you are using Azure/Microsoft Bot, you can hook up a channel to LUIS and use the id to identify user (skype id, phone number, microsoft teams id...)
A bit of info for connecting Azure Bot with SharePoint.

User's title attribute from Teams bot

I have a working Teams bot, using the nodejs botbuilder-teams SDK v3, and registered at dev.botframework.com and apps.dev.microsoft.com. I have created a Teams app that contains it (using the App Studio app in Teams), and installed it in an Office 365 developer tenant of which I am the admin, and the bot can send and receive messages with no problem.
When the bot is added to a team, I get the "conversationUpdate"/"teamMemberAdded" message, and use the fetchMembers() call from the teams bot connector to retrieve basic info for each member, including "givenName", "surname", "email", etc. However, I don't get the "jobTitle" attribute. Is there any way to retrieve jobTitle through the Teams bot SDK?
Alternatively, could I make MSGraph API calls (say, /v1.0/groups/{group-id-for-teams}/members)? Is there a good example of a nodejs serverside app like a bot calling the MSGraph API? The authentication part seems somewhat murky to me.
jobTitle is not part of roster details. You need to call Graph APIs to fetch additional details.
Here is Node.js sample for bot authentication. If you are using Azure for bot registration then please take a look at Azure Bot Service for Authentication in Teams documentation.

Authenticate to Dynamics 365 for Mobile App without Registering App in AD

I was doing some research on authenticating to Dynamics 365 through the Web API and everything I come across says that you have to register your app in AD to get a client id. If I wanted to publish an app to the app store or google play store for multiple dynamics 365 users to use across many different organizations, how would that be accomplished? Would users have to get their admins to register the app in AD before they could use it? I'm confused as to how to create an app for dynamics for general distribution. A point in the right direction would be much appreciated or if it's not possible, that's fine too....pulling my hair out searching!

Resources