An Azure service that is used to control and help secure email, documents, and sensitive data that are shared outside the company.
**CA policies can only target apps that have a service principle registered. To fix this you need to create a service principle using GraphApi/Explorer or PowerShell.
Step 1 — Create the service principal via Graph Explorer:**
Method: POST
URL: https://graph.microsoft.com/v1.0/servicePrincipals
Body:
{ "appId": "1b730954-1685-4b74-9bfd-dac224a7b894" }
**Step 2 — Create CA policy using Graph Explorer (REPORT ONLY FIRST, THEN ENABLE)**
Method: POST
URL: https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies
Body:
```json
{
"displayName": "Block App
"state": "enabledForReportingButNotEnforced",
"conditions": {
"clientAppTypes": ["all"],
"applications": {
"includeApplications": ["1b730954-1685-4b74-9bfd-dac224a7b894"],
"excludeApplications": []
},
"users": {
"includeUsers": ["All"],
"excludeUsers": [],
"excludeGroups": [],
"excludeRoles": []
}
},
"grantControls": {
"operator": "OR",
"builtInControls": ["block"]
}
}