How to authenticate two azure app services that has vue.js and nest.js deployed on them individually

aun 0 Reputation points
2024-04-03T19:12:56.2466667+00:00

We have two app services that hosts a vue.js front-end and a nest.js backend. The issue is that we want the nest.js backend to be secure with entraID and we did implement that, however, when the API is called, it asks the user to be logged in through AAD. On the vue.js front-end, we have implemented MSAL and it works fine.

We want to secure our backend with auth and the front-end as well but want the ability for them to communicate with each other. If they were both in the same azure app service, they could have used the same token but they are deployed differently. Also, can we deploy a node.js and vue.js app on the same app service that uses the same entraID?

Please do help me here, we are really stuck. We tried sending the IDToken, AccessToken and other stuff as a header in the endpoints but we get an error of invalidation.

One of the suggesion is that we have 2 app services, but you should only be using 1 app registration, the roles are defined in the app registration, and you want to share the roles.

How would this work? Kindly help us please..

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,896 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,066 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.