Prerequisites¶
Required Permissions¶
Microsoft Entra ID¶
| Permission | Scope | Purpose |
|---|---|---|
| Environment.Read | Power Platform | Enumerate environments |
| Dynamics CRM user_impersonation | Delegated | Read/write Dataverse tables |
Power Platform¶
| Role | Scope | Purpose |
|---|---|---|
| Power Platform Admin | Tenant | Enumerate all environments |
| System Administrator | Dataverse org | Read bot table, write baselines/violations |
Azure Automation (Optional)¶
| Permission | Purpose |
|---|---|
| Automation Contributor | Import and manage runbook |
| Certificate access | Certificate-based authentication |
Required Modules¶
PowerShell¶
# Install required modules
Install-Module -Name MSAL.PS -MinimumVersion 4.37.0 -Scope CurrentUser
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Scope CurrentUser
Python¶
Required packages:
- msal>=1.30.0 — Microsoft Authentication Library
- requests>=2.32.0 — HTTP client
Entra ID App Registration¶
- Navigate to Entra ID > App registrations > New registration
- Name:
FSI-FileUploadSecurity(or your naming convention) - Supported account types: Single tenant
- Add API permissions:
- Dynamics CRM:
user_impersonation - Grant admin consent
- Create a certificate for non-interactive authentication:
- Upload the certificate public key (
.cer) to the app registration
Environment Variables¶
Set these for CLI-based deployment:
| Variable | Description | Example |
|---|---|---|
FUS_TENANT_ID |
Microsoft Entra ID tenant ID | contoso.onmicrosoft.com |
FUS_CLIENT_ID |
App registration client ID | 12345-abcd-... |
FUS_CLIENT_SECRET |
Client secret (dev only) | *** |
FUS_DATAVERSE_URL |
Dataverse org URL | https://governance.crm.dynamics.com |
External Dependencies¶
Zone Classification¶
The zone classification logic (scripts/private/Get-ZoneClassification.ps1) is self-contained within this solution. It uses a two-tier approach:
- ELM Dataverse lookup (preferred) — queries the
fsi_acv_environmentregistrationstable when-DataverseUrland-AccessTokenare provided - Naming convention fallback — pattern-matches the environment display name when ELM data is unavailable
Unclassifiable environments default to Zone 3 (most restrictive) for fail-safe governance. To ensure accurate zone classification, pass -DataverseUrl to Get-AgentFileUploadSettings.
Network Requirements¶
| Endpoint | Protocol | Purpose |
|---|---|---|
login.microsoftonline.com |
HTTPS | Authentication |
*.crm.dynamics.com |
HTTPS | Dataverse API |
api.bap.microsoft.com |
HTTPS | Power Platform admin API |
File Upload Security Configurator — Prerequisites