Login one time for two applications MSAL angular

Aldair Revilla 0 Reputation points
2023-08-22T05:00:38.6233333+00:00

Hello

I have two applications, APP A and APP B, these apps are angular project MSAL that use Azure AD B2C service.

If the user authenticates from APP A or APP B
then the page should show APP A Home or APP B Home respectively.

Is there any way to log in to an APP so that I can also be logged in to another APP?

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
{count} votes

3 answers

Sort by: Most helpful
  1. Fabio Andrade 1,665 Reputation points Microsoft Employee Moderator
    2023-08-22T18:54:25.97+00:00

    Hi @Aldair Revilla

    Based on how authentication works on Azure AD you cannot do that. Access tokens provided by Azure AD are created based on the application identification, more specifically the audience (aud), which should match the Application ID on Azure AD. So, in your scenario, App A and APP B would have different aud information as those are 2 different applications, for that reason there's no way to use the same access token for both applications.

    The documentation below has more information about Access Tokens:

    https://learn.microsoft.com/en-us/azure/active-directory/develop/access-tokens

    0 comments No comments

  2. Fabio Andrade 1,665 Reputation points Microsoft Employee Moderator
    2023-09-08T21:46:58.5266667+00:00

    @Aldair Revilla

    I wanted to check in and see if you had any other questions or if you were able to resolve this issue?

    If you have any other questions, please let me know. Thank you for your time and patience throughout this issue.


    If the information helped address your question, please Accept the answer. This will help us and also improve searchability for others in the community who might be researching similar information.

    0 comments No comments

  3. Fabio Andrade 1,665 Reputation points Microsoft Employee Moderator
    2023-09-14T22:02:57.9633333+00:00

    @Aldair Revilla

    I wanted to check in and see if you had any other questions or if you were able to resolve this issue?

    If you have any other questions, please let me know. Thank you for your time and patience throughout this issue.


    If the information helped address your question, please Accept the answer. This will help us and also improve searchability for others in the community who might be researching similar information.

    0 comments No comments

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.