Should the GUI and API be registered as separate applications in Azure Active Directory?

Keiichi Hikita 41 Reputation points
2022-04-22T08:07:35.637+00:00

I am developing an API to authenticate with Azure Active Directory and a GUI to draw from it.
The GUI will be implemented as a Single Page Application (SPA) and the API will be executed from this SPA.
Both the API and GUI will be authenticated with Azure Active Directory.

I would like to know what is a good practice in this kind of pattern. When registering an application with this kind of configuration on Azure Active Directory, should the GUI and API be registered as different applications?

It seems to me that registering them as the same application (same client ID for API and GUI) would not cause any problems if we only look at the behavior.

We would like to determine whether we should separate the GUI and API as applications based on practices (e.g., from a security perspective, etc.).

Thanks,
Keiichi Hikita

Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,454 questions
Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

Accepted answer
  1. James Hamil 27,221 Reputation points Microsoft Employee Moderator
    2022-04-25T21:34:31.743+00:00

    Hi @Keiichi Hikita , thank you so much for your detailed response. Everything you suggested would work well for your cause. However, I think having 2 apps would serve you better!

    A lot of customers only use 1 app because it's usually simpler. But in the long term for both security and maintenance reasons having 2 apps can make this a lot easier and safer.

    As far as security goes, I usually recommend this document on best practices. Not all of the info there is pertinent to your case, but it is good to know generally.

    Please let me know if you have any more questions, or you need help setting anything up!

    If this answer helped you please mark it as "Verified" so other users can reference it.

    Thank you,
    James

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.