Flux separates user authorization from Azure service authorization into two completely independent identity paths. Users authenticate with Microsoft Entra ID — App Service Authentication validates the token and injects the claims principal before the request reaches Flux. Flux authenticates to Azure with its managed identity — no client secret exists in either path. The two identities never borrow each other’s permissions, and a third workload-identity federation credential scoped only to App Service deployment completes the boundary.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/admbe/FluxOp/llms.txt
Use this file to discover all available pages before exploring further.
Identity flows
| Flow | Identity | Mechanism |
|---|---|---|
| User → Flux | Microsoft Entra user or group | App Service Authentication and X-MS-CLIENT-PRINCIPAL |
| Flux → Azure Resource Graph and Advisor | App Service managed identity | ManagedIdentityCredential and Azure RBAC |
| Flux → Cost Management | App Service managed identity | ManagedIdentityCredential and Microsoft.CostManagement/*/read |
Configure Entra app roles
Define app roles on the Entra app registration
| Display name | Value | Allowed member types | Description |
|---|---|---|---|
| Flux Reader | Flux.Reader | Users/Groups | Read-only access to dashboards, inventory, and opportunities |
| Flux Administrator | Flux.Admin | Users/Groups | Read access plus integration configuration and synchronization |
Users/Groups and must be enabled.Assign users or groups through the enterprise application
Flux.Reader or Flux.Admin access.Users without an assigned role will receive a 403 with a role message from Flux even if they successfully authenticate with Entra.Set role mapping application settings
Enable App Service Authentication
Add the Microsoft identity provider
X-MS-CLIENT-PRINCIPAL header on every authenticated request and remove any client-supplied copy of that header.Require authentication and set redirect behavior
401.Do not set this to Allow unauthenticated requests — doing so would allow Flux routes to be reached without a validated principal.Restrict the issuer to the expected tenant
Set the required application settings
FLUX_AUTH_MODE=mock (the local development default), Flux ignores the principal header entirely and presents a mock administrator session.Enable managed identity
System-assigned identity
FLUX_MANAGED_IDENTITY_CLIENT_ID setting is required.User-assigned identity (optional)
Assign Azure RBAC
Grant Reader for Azure Resource Graph
Reader on each configured subscription:Reader role is sufficient for inventory, Advisor recommendations, and Azure Policy posture through ARG.Grant Cost Management read access
Microsoft.CostManagement/*/read at each configured subscription or an inherited management-group scope. The deployed custom FinOps Platform Reader role includes this permission:FinOps Platform Reader custom role is not deployed in your environment, assign a custom role that includes Microsoft.CostManagement/*/read and the appropriate resource read permissions. Keep this strictly read-only.Wait for RBAC propagation
403 errors immediately after assignment, wait a few minutes and retry synchronization.| Symptom | Likely cause |
|---|---|
| Managed identity token failure | Identity is not enabled, or the user-assigned client ID is wrong |
ARG 403 | Managed identity lacks Reader or custom read access at the requested scope |
| Empty ARG result | Identity can authenticate but cannot read resources in the configured subscriptions |
Cost 403 | Managed identity lacks Microsoft.CostManagement/*/read at the subscription or an inherited scope |
Cost 429 | Cost Management throttled the query; Flux retries, preserves completed scopes, and retains previous successful scope data |
How Flux decodes the principal
App Service validates the user token and injects a Base64-encoded claims document in theX-MS-CLIENT-PRINCIPAL request header. Flux processes this on every authenticated request:
- Decode the Base64 document into the claims array.
- Validate the tenant claim — when
FLUX_ENTRA_TENANT_IDis configured, Flux rejects principals whose tenant does not match. - Map role and group claims — role values and group object IDs in
FLUX_ENTRA_ADMIN_ASSIGNMENTSandFLUX_ENTRA_READER_ASSIGNMENTSare matched against the principal’s claims. - Return the resolved session from
/api/session— the response carries the resolved role (readeroradmin), the user’s display name, and whether admin features are available. - Enforce reader/admin boundaries on API routes. The frontend hides Integrations from readers, but the API authorization checks are the security boundary.
Local development
For local development, Flux defaults to mock authentication:FLUX_AUTH_MODE=entra locally and send a locally generated X-MS-CLIENT-PRINCIPAL header. Never apply this pattern to a production route — only use entra mode behind correctly configured App Service Authentication.