Forum Discussion
How to load Component in App interface of teams apps
Nikitha-MSFT Thank you for replying. Below is exactly requirement
Requirement:- Show one tab along with login button in App interface. When click on log-in button,show one task module for user log-in and when click on submit on user log-in task module,close the pop-up and update data in App interface.
When log-in API is responding session-id, I am calling another API to get data using session-id which is used to show in App interface. Now this data is updating in user log-in task module
ManikantSingh - Are you trying to authenticate user? If so could you please check this https://github.com/OfficeDev/microsoft-teams-sample-auth-node/tree/master/src/views/tab/simple
- ManikantSinghAug 13, 2020Copper Contributor
Thank you for replying. I did https://github.com/OfficeDev/msteams-tabs-sso-sample-nodejs SSO login type of authentication. Now please tell me how to generate sessionId for calling API
- Wajeed-MSFTAug 14, 2020
Microsoft
ManikantSingh - To call Graph APIs you need access token. You can get the access token by calling following method:
Get an authentication token from your client-side code
var authTokenRequest = { successCallback: function(result) { console.log("Success: " + result); }, failureCallback: function(error) { console.log("Failure: " + error); }, }; microsoftTeams.authentication.getAuthToken(authTokenRequest);
Also, please take a look at Asking for additional consent using the Auth API.
- techie2021Nov 23, 2021Copper ContributorMy AAD Application is multi-tenant but the getAuthToken takes to /{tenantID} endpoint. How can I make the call to /common?