Events
Apr 9, 3 PM - Apr 10, 12 PM
Code the Future with AI and connect with Java peers and experts at JDConf 2025.
Register NowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Conditional Access policies historically applied only to users when they access apps and services like SharePoint Online. We're now extending support for Conditional Access policies to be applied to service principals owned by the organization. We call this capability Conditional Access for workload identities.
A workload identity is an identity that allows an application or service principal access to resources, sometimes in the context of a user. These workload identities differ from traditional user accounts as they:
These differences make workload identities harder to manage and put them at higher risk for compromise.
Important
Workload Identities Premium licenses are required to create or modify Conditional Access policies scoped to service principals. In directories without appropriate licenses, existing Conditional Access policies for workload identities continue to function, but can't be modified. For more information, see Microsoft Entra Workload ID.
Note
Policy can be applied to single tenant service principals that are registered in your tenant. Third party SaaS and multi-tenanted apps are out of scope. Managed identities aren't covered by policy. Managed identities could be included in an access review instead.
Conditional Access for workload identities enables blocking service principals:
Create a location based Conditional Access policy that applies to service principals.
Create a risk-based Conditional Access policy that applies to service principals.
If you wish to roll back this feature, you can delete or disable any created policies.
The sign-in logs are used to review how policy is enforced for service principals or the expected affects of policy when using report-only mode.
Failure reason when Conditional Access blocks a Service Principal: "Access has been blocked due to Conditional Access policies."
To view results of a location-based policy, go to the Report-only tab of events in the Sign-in report, or use the Conditional Access Insights and Reporting workbook.
To view results of a risk-based policy, refer to the Report-only tab of events in the Sign-in report.
You can get the objectID of the service principal from Microsoft Entra Enterprise Applications. The Object ID in Microsoft Entra App registrations can’t be used. This identifier is the Object ID of the app registration, not of the service principal.
Sample JSON for location-based configuration using the Microsoft Graph beta endpoint.
{
"displayName": "Name",
"state": "enabled OR disabled OR enabledForReportingButNotEnforced",
"conditions": {
"applications": {
"includeApplications": [
"All"
]
},
"clientApplications": {
"includeServicePrincipals": [
"[Service principal Object ID] OR ServicePrincipalsInMyTenant"
],
"excludeServicePrincipals": [
"[Service principal Object ID]"
]
},
"locations": {
"includeLocations": [
"All"
],
"excludeLocations": [
"[Named location ID] OR AllTrusted"
]
}
},
"grantControls": {
"operator": "and",
"builtInControls": [
"block"
]
}
}
Events
Apr 9, 3 PM - Apr 10, 12 PM
Code the Future with AI and connect with Java peers and experts at JDConf 2025.
Register NowTraining
Module
Plan, implement, and administer Conditional Access - Training
Conditional Access gives a fine granularity of control over which users can do specific activities, access which resources, and how to ensure data and systems are safe.
Certification
Microsoft Certified: Identity and Access Administrator Associate - Certifications
Demonstrate the features of Microsoft Entra ID to modernize identity solutions, implement hybrid solutions, and implement identity governance.
Documentation
Securing workload identities with Microsoft Entra ID Protection - Microsoft Entra ID Protection
Workload identity risk in Microsoft Entra ID Protection
Frequently asked questions about Microsoft Entra Workload ID - Microsoft Entra Workload ID
Learn about Microsoft Entra Workload ID license plans, features, and capabilities.
Microsoft-managed Conditional Access policies - Microsoft Entra ID
Secure your resources with Microsoft-managed policies and take action to require multifactor authentication to reduce the risk of compromise.