Hello @Andrew Kochie,
Thank you for posting your query on Microsoft Q&A.
Based on your description, it seems you want to fetch user information for individuals logged into your Teams app chatbot. You can achieve this by making a Microsoft Graph API call to retrieve the signed-in user's details. To do this, you’ll need to generate an access token for the Microsoft Graph API using scopes such as user.read
, email
, profile
, openid
, and offline_access
through the OAuth flow.
Using the user.read
scope, user fetch their own details by sending a GET request to the following endpoint: GET https://graph.microsoft.com/v1.0/me
To generate a delegated access token, you can follow the steps outlined in the Microsoft documentation for the OAuth 2.0 authorization code grant flow:
Request an ID token or hybrid flow using OAuth 2.0
Graph API - Get user details
If you would like to fetch details of other users, you will need to use the user.read.all
scope when generating an access token. This scope allows you to retrieve information about all users within the directory.
I hope this information is helpful. Please feel free to reach out if you have any further questions.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Thanks,
Raja Pothuraju.