Skip to content

Commit 277bdec

Browse files
authored
Revise Azure article for Entra content and structure
Updated structure and content for Microsoft Entra section, including details on single-tenant vs multi-tenant, App Registrations, and Service Principals.
1 parent 77aa4a6 commit 277bdec

File tree

1 file changed

+29
-7
lines changed

1 file changed

+29
-7
lines changed

_articles/azure.md

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,47 @@ layout: page
33
title: Azure
44
---
55

6-
## Entra: Tenancy
6+
## Entra
7+
8+
### Single-tenant vs multi-tenant
79

810
- **Single-tenant Entra**
911
- **Multi-tenant Entra**
1012

11-
## Entra: Identity management
13+
### App Registrations and Service Principals
1214

1315
In Microsoft Entra (formerly Azure AD):
1416

1517
- **App registration** defines an application (client secrets, API permissions, redirect URIs, etc.). It is _"a template or blueprint to create one or more service principal objects."_
16-
- **Service principal** (also called **Enterprise Application** in the UI) is like an instance of the application. It defines the access policy and permissions for the user/application in the Microsoft Entra tenant. There can be many service principals linked to 1 app registration.
18+
- **Service principal** (appears in **Enterprise Application** in the UI) is like an instance of the application. It defines the access policy and permissions for the user/application in the Microsoft Entra tenant. There can be many service principals linked to 1 app registration.
1719

1820
To authenticate as a service principal, you need:
1921
- `client_id` (from App Registration)
2022
- `client_secret` or certificate (from App Registration)
2123
- `tenant_id` (your Entra tenant)
2224

23-
Some nuggets of info from the docs - https://learn.microsoft.com/en-us/entra/identity-platform/app-objects-and-service-principals?tabs=browser#application-object :
25+
#### Key differences between App Registrations, Service Principals, Enterprise Applications
26+
27+
- **Credentials live on App Registrations, not Service Principals.** Client secrets and certificates are stored on the App Registration, and all Service Principals linked to that registration share the same credentials.
28+
- **"Enterprise Applications" is just a UI view of Service Principals.** Despite the confusing name, it's not a separate object type - it's simply where Azure Portal displays Service Principal identities, including those linked to App Registrations and standalone ones like Managed Identities.
29+
- **"If you register an application, an application object and a service principal object are automatically created in your home tenant"** - In other words, creating an App Registration **in the UI** will also create a Service Principal, in your current Microsoft Entra tenant. However when creating via API/Terraform, you may need to explicitly create the Service Principal separately, **and you will need specific permissions in Entra to be able to do that.**
30+
- **"A service principal is created in every tenant where the application is used"** -- In other words, you just need to create 1 service principal, unless you are working with many Entra tenants.
31+
32+
Sources:
33+
34+
- https://learn.microsoft.com/en-us/entra/identity-platform/app-objects-and-service-principals?tabs=browser#application-object
35+
- https://stackoverflow.com/questions/65922566/what-are-the-differences-between-service-principal-and-app-registration
36+
37+
## Cookbook
38+
39+
### RBAC
40+
41+
#### Working with App Registrations and Service Principals
42+
43+
```sh
44+
# Fetch an App Registration
45+
az ad app list --display-name "my-client-app"
2446

25-
- _"If you register an application, an application object and a service principal object are automatically created in your home tenant"_ - In other words, creating an App Registration **in the UI** will also create a Service Principal, in your current Microsoft Entra tenant. However when creating via API/Terraform, you may need to explicitly create the Service Principal separately.
26-
- _"A single-tenant application has only one service principal (in its home tenant), created and consented for use during application registration"_ - this says the same thing.
27-
- _"A service principal is created in every tenant where the application is used ... A multitenant application also has a service principal created in each tenant where a user from that tenant has consented to its use."_ -- In other words, you should just need to create 1 of these service principals, unless you have many Entra tenants.
47+
# Fetch a Service Principal
48+
az ad sp list --display-name "my-client-app"
49+
```

0 commit comments

Comments
 (0)