Aug 09 2020 11:11 PM - edited Aug 09 2020 11:14 PM
I have developed one task module in Teams Apps which help me to log-in the user. After Successful logged-in, submitTask method is being called for closing task module. in mean while I am also fetching data from Back-end to display App interface after successful logged-in. but data is updating in task module not in App interface. Please help me what snap code is required for this issue in ReactJS and typescript.
Aug 10 2020 05:37 AM
@ManikantSingh - Are you trying to display the result using bot or tab on submit Could you please explain your scenario in more detail?
Aug 10 2020 08:47 PM
@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
Aug 13 2020 04:18 AM
@ManikantSingh - Are you trying to authenticate user? If so could you please check this sample?
Aug 13 2020 05:40 AM
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
Aug 13 2020 11:16 PM
@ManikantSingh - To call Graph APIs you need access token. You can get the access token by calling following method:
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.
Aug 20 2020 01:06 AM
@Wajeed-MSFT Thank you for replying
I pass session Id parameter in API called to identify user`s session in web application project
For Teams Apps, how to generate this sessionId to integrate with web application project when I am using SSO login
Aug 20 2020 01:24 AM
@ManikantSingh - In Token-based Authentication no session is persisted server-side (stateless). You can pass your access token which then can be used to call Graph APIs.
Nov 22 2021 10:47 PM