Prerequisites
Complete requirements for deploying the Segregation of Duties Detector.
Licensing Requirements
Required
| License |
Quantity |
Purpose |
| Power Platform Premium |
Per flow creator |
PowerShell detection scripts; Power Automate flows (planned) |
| Dataverse capacity |
500 MB minimum |
Violation and rule storage |
| Microsoft Entra ID P1 |
Included with M365 E3+ |
Role assignment queries |
Recommended
| License |
Purpose |
| Microsoft Entra ID P2 |
Privileged Identity Management integration |
| Power BI Pro |
Advanced reporting dashboards |
Permission Requirements
Microsoft Entra ID Roles
| Role |
Required For |
| Global Reader |
Query directory role assignments |
| Directory Readers |
Alternative for limited read access |
| Role |
Required For |
| Power Platform Administrator |
Query environment role assignments |
| System Administrator |
Dataverse table creation and queries |
Microsoft Graph API Permissions
| Permission |
Type |
Purpose |
RoleManagement.Read.Directory |
Application |
Read Entra ID role assignments |
User.Read.All |
Application |
Read user details |
Directory.Read.All |
Application |
Read directory information |
Service Principal Setup
1. Register Application
- Navigate to Microsoft Entra ID > App registrations
- Click New registration
- Configure:
- Name:
FSI-AgentGov-SoDDetector
- Supported account types: Single tenant
- Click Register
- Note the Application (client) ID and Directory (tenant) ID
- Go to API permissions
- Click Add a permission > Microsoft Graph
- Select Application permissions
- Add:
RoleManagement.Read.Directory
User.Read.All
Directory.Read.All
- Click Grant admin consent
3. Create Client Secret
- Go to Certificates & secrets
- Click New client secret
- Configure:
- Description:
SoDDetector-Secret
- Expiration: 24 months
- Copy and store the secret value securely
The Power Platform BAP API (/providers/Microsoft.BusinessAppPlatform/scopes/admin/...)
will return 403 Forbidden for service principals that have not been registered as a
Power Platform admin via the Power Platform Admin module — the Power Platform
Administrator Entra role alone is not sufficient. Without this step,
Invoke-SoDScan.ps1 exits non-zero with the message "All N Power Platform environment
role queries failed" (fail-closed).
# Run as a tenant admin signed in to Power Platform CLI / module
Install-Module Microsoft.PowerApps.Administration.PowerShell -Scope CurrentUser
Add-PowerAppsAccount
New-PowerAppManagementApp -ApplicationId <your-client-id>
Reference: Use service principal accounts to connect to Power Platform.
5. Store in Azure Key Vault
# Create secret in Key Vault
az keyvault secret set --vault-name "your-vault" --name "SoD-ClientSecret" --value "<secret-value>"
Environment Requirements
Dataverse Environment
| Requirement |
Specification |
| Type |
Production or Sandbox |
| Capacity |
500 MB minimum available |
| Security Groups |
Configured for SoD roles |
| Requirement |
Purpose |
| Managed Environment |
Enhanced governance features |
| DLP Policies |
Allow required connectors |
Network Requirements
Firewall Allowlist
| Endpoint |
Purpose |
graph.microsoft.com |
Microsoft Graph API (commercial) |
graph.microsoft.us |
Microsoft Graph API (GCC High) |
microsoftgraph.chinacloudapi.cn |
Microsoft Graph API (China / 21Vianet) |
*.crm.dynamics.com |
Dataverse (commercial) |
*.crm.microsoftdynamics.us |
Dataverse (GCC High) |
*.crm.appsplatform.us |
Dataverse (DoD) |
*.crm.dynamics.cn |
Dataverse (China / 21Vianet) |
*.api.powerplatform.com |
Power Platform API |
api.bap.microsoft.com |
Power Platform BAP API (commercial) |
api.bap.appsplatform.us |
Power Platform BAP API (US sovereign / GCC High) |
api.bap.partner.microsoftonline.cn |
Power Platform BAP API (China sovereign / 21Vianet) |
login.microsoftonline.com |
Authentication (commercial) |
login.microsoftonline.us |
Authentication (GCC High) |
login.partner.microsoftonline.cn |
Authentication (China / 21Vianet) |
Dependencies
Required
| Solution |
Version |
Purpose |
| None |
- |
Standalone deployment possible |
Optional Integrations
| Solution |
Version |
Benefit |
| Environment Lifecycle Management |
v1.1.0+ |
Environment context for violations |
| FINRA Supervision Workflow |
v1.0.0+ |
Supervision role validation |
| Conditional Access Automation |
v1.0.0+ |
Access policy enforcement |
Validation Checklist
Before deployment, verify:
Next Steps
- Deploy Dataverse Schema
- Configure Conflict Rules
Segregation of Duties Detector v1.1.0