You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/active-directory/architecture/service-accounts-principal.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ An application instance has two properties: the ApplicationID (or ClientID) and
33
33
34
34
> [!NOTE]
35
35
> The terms **application** and **service principal** are used interchangeably, when referring to an application in authentication tasks. However, they are two representations of applications in Microsoft Entra ID.
36
-
36
+
37
37
The ApplicationID represents the global application and is the same for application instances, across tenants. The ObjectID is a unique value for an application object. As with users, groups, and other resources, the ObjectID helps to identify an application instance in Microsoft Entra ID.
38
38
39
39
To learn more, see [Application and service principal relationship in Microsoft Entra ID](../develop/app-objects-and-service-principals.md)
@@ -43,8 +43,9 @@ To learn more, see [Application and service principal relationship in Microsoft
43
43
You can create an application and its service principal object (ObjectID) in a tenant using:
44
44
45
45
* Azure PowerShell
46
+
* Microsoft Graph PowerShell
46
47
* Azure command-line interface (Azure CLI)
47
-
* Microsoft Graph
48
+
* Microsoft Graph API
48
49
* The Azure portal
49
50
* Other tools
50
51
@@ -85,17 +86,17 @@ When using service principals, use the following table to match challenges and m
85
86
To find accounts, run the following commands using service principals with Azure CLI or PowerShell.
For more information, see [Get-AzureADServicePrincipal](/powershell/module/azuread/get-azureadserviceprincipal)
91
+
For more information, see [Get-MgServicePrincipal](/powershell/module/microsoft.graph.applications/get-mgserviceprincipal)
91
92
92
93
## Assess service principal security
93
94
94
95
To assess the security, evaluate privileges and credential storage. Use the following table to help mitigate challenges:
95
96
96
97
|Challenge | Mitigation|
97
98
| - | - |
98
-
| Detect the user who consented to a multi-tenant app, and detect illicit consent grants to a multi-tenant app | - Run the following PowerShell to find multi-tenant apps <br>`Get-AzureADServicePrincipal -All:$true ? {$_.Tags -eq WindowsAzureActiveDirectoryIntegratedApp"}`</br> - Disable user consent </br> - Allow user consent from verified publishers, for selected permissions (recommended) </br> - Configure them in the user context </br> - Use their tokens to trigger the service principal|
99
+
| Detect the user who consented to a multi-tenant app, and detect illicit consent grants to a multi-tenant app | - Run the following PowerShell to find multi-tenant apps <br>`Get-MgServicePrincipal -All:$true |? {$_.Tags -eq "WindowsAzureActiveDirectoryIntegratedApp"}`</br> - Disable user consent </br> - Allow user consent from verified publishers, for selected permissions (recommended) </br> - Configure them in the user context </br> - Use their tokens to trigger the service principal|
99
100
|Use of a hard-coded shared secret in a script using a service principal|Use a certificate|
100
101
|Tracking who uses the certificate or the secret| Monitor the service principal sign-ins using the Microsoft Entra sign-in logs|
101
102
|Can't manage service principal sign-in with Conditional Access| Monitor the sign-ins using the Microsoft Entra sign-in logs
@@ -134,3 +135,5 @@ Conditional Access:
134
135
Use Conditional Access to block service principals from untrusted locations.
135
136
136
137
See, [Create a location-based Conditional Access policy](../conditional-access/workload-identity.md#create-a-location-based-conditional-access-policy)
0 commit comments