connecting front end react spa with node.js backend daemon service

md-1799 1 Reputation point

Hi, I have a react SPA using @azure/msal-react and @azure/msal-browser - similar to this tutorial, so I can sign in, call the MS graph api, sign out etc as documented there. Sp far, so good.

However, for my app I want the user signing in to the react SPA to be authorising a backend service / daemon (for my app) to perform actions on their behalf against the graph api, even when they don't have the react SPA open and signed in. The backend is written in node.js sitting behind an api gateway. So I'm thinking there might be some way to pass the client side information / tokens across to @azure/msal-node so that the backend daemon can keep using the graph api on behalf of the user - but I can't find any information around this.

Is this possible? Can anyone point me at some material in the right direction?

Thanks! Mark

Update: it seems to me what I'm trying to do is similar in intent to this section of this page: - sharing the token cache?

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,677 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. md-1799 1 Reputation point

    Update: I think i've realised i have this very backwards, i'll post back if i get it going the right way around

    0 comments No comments