Forum Discussion
Deleted
Nov 14, 2022I need help on best practice with sso on a custom teams app in tab
Hello all, I've been trying to get a MS Teams Custom App running with SSO for several days now. All the examples I have looked at work but do not apply to my application. Maybe I have a wrong approa...
- Nov 21, 2022
Deleted -
If you want to get id token at server side before page is loaded, it's not possible. You will get that at client side only.
Thanks,
Prasad Das
----------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link.
Deleted
Nov 14, 2022thank you for the answer.
this is an interesting link. however, this is exactly how i implemented it and it works. however, when i get the token through "getAuthToken" it is too late.
My thinking is that I provide my view for rendering the HTML page in the controller code. To be able to read the necessary data from e.g. MS-Graph I need the accessToken. This is not yet there at this time. The token is requested by the javescript code of the web page. This code runs only after the server side code of the controller has run. So I can never use the accessToken directly in the controller code.
I use the ControllerCode as a "codebehind" like earlier in ASP.NET technology. So I have a C# code and the matching ASPX page. Today I see the "codebehind" in the controller code of the respective mapping and the HTML code in the CSHTML page.
Maybe I don't understand the concept yet. Therefore the question to the Commuinty how to solve such a problem and would be grateful for any hint.
Thx Mike
this is an interesting link. however, this is exactly how i implemented it and it works. however, when i get the token through "getAuthToken" it is too late.
My thinking is that I provide my view for rendering the HTML page in the controller code. To be able to read the necessary data from e.g. MS-Graph I need the accessToken. This is not yet there at this time. The token is requested by the javescript code of the web page. This code runs only after the server side code of the controller has run. So I can never use the accessToken directly in the controller code.
I use the ControllerCode as a "codebehind" like earlier in ASP.NET technology. So I have a C# code and the matching ASPX page. Today I see the "codebehind" in the controller code of the respective mapping and the HTML code in the CSHTML page.
Maybe I don't understand the concept yet. Therefore the question to the Commuinty how to solve such a problem and would be grateful for any hint.
Thx Mike
Prasad_Das-MSFT
Microsoft
Nov 21, 2022Deleted -
If you want to get id token at server side before page is loaded, it's not possible. You will get that at client side only.
Thanks,
Prasad Das
----------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link.