Forum Discussion

David_Elsner's avatar
David_Elsner
Brass Contributor
Oct 05, 2024

Get refresh token of Teams Desktop of the current user

The Teams client must store access and refresh tokens somewhere (probably encrypted in the local or session storage of the underlying browser)

I am wondering, if there is a way to read those tokens, especially the refresh token that Teams uses to call its Apis in the background.

If I open the Teams developer tools, I can not find the token in any of the requests.
And Fiddler seems to block Teams and there is no easy way to sniff the traffic produced by the client- do you have any other idea?

 

Why do I need this?

I need this token to write a script that uses the unofficial Teams api (not the graph).
I want to use this API to create a link to a certain SharePoint library in all my Teams (it used to be called "Add cloud storage")
This option is not available in the Graph and therefore I have to use the unofficial Teams Api to create those references programmatically.

Getting a token for it (via authorization code flow) seems only possible with the Teams client itself.

8 Replies

Resources