I'm working on an MS Teams app with React frontend and Azure AD to manage users. My goal is to get the ID of currently signed in user from AAD.
I've found some examples on how to use MS Graph to get the data I need. I'm trying to implement this solution.
I don't understand what should I use as the teamsfx context used when useGraph is called. I would have asked right under the linked question, but I don't have enough reputation to comment.
Also I want to ask: is it possible to get the AAD user ID purely on frontend, or do I have to implement something on backend (Node.js in my case) too? I'm kind of confused on how the MS Graph and AAD integration works together.
If there's some easier way to get the AAD use ID, please let me know, because maybe I'm overcomplicating things.
Thanks for any help.