A Master workspace can hold one Entra app registration that every MSP and client under it uses. Saved here, it proves itself to Microsoft with a federated credential (no stored secret) or a client secret. These calls work on Master workspaces only.
Authenticate with the Master's workspace key in Authorization and an M2M token from an app in the Master workspace in X-Authorization. A member JWT also works in X-Authorization: any member may read, and testing or saving takes an owner or admin (403 workspace_admin_required). See Authentication.
Federated credential#
With a federated credential, Microsoft accepts a short assertion that Scute signs in place of a password. Scute stores no secret for the app. The signing key is held in a KMS and cannot be exported. Add the credential on the app registration under Certificates and secrets, Federated credentials, Add credential, scenario Other issuer:
| Field | Value |
|---|---|
| Issuer | https://api.scute.io/entra-federation |
| Subject identifier | workspace: followed by the Master workspace UUID (not its slug) |
| Audience | api://AzureADTokenExchange |
The three values are in federation of Get the Master app. The same credential covers GDAP connections made on the Master's app.
To move an app that runs on a client secret: add the federated credential next to the secret in Azure, test it against a client tenant, switch, send a push to check, then delete the old secret in Azure.
Errors on these calls:
| Status | error_code | When |
|---|---|---|
| 401 | Missing key, or no M2M token or member JWT in X-Authorization. | |
| 403 | The key or token belongs to another workspace. | |
| 403 | not_a_master_workspace | The path workspace is not a Master. |
| 404 | No workspace with that id or slug. | |
| 422 | missing_tenant_id | tenant_id is missing on a federated test or save. |
| 422 | missing_credentials | No client_id and none saved yet, or a secret save without client_id and client_secret. |
| 422 | federation_unavailable | The deployment has no signing key for federated credentials yet. |
| 422 | invalid_credential_type | credential_type is not secret or federated (the test takes federated only). |
| 422 | handshake_failed | Microsoft refused the federated credential. Save only. |
When Microsoft refuses, microsoft_code says why:
| microsoft_code | Meaning |
|---|---|
| AADSTS70025 | The app has no federated credential. |
| AADSTS70021 | No federated credential on the app matches the three values. |
| AADSTS700211 | The issuer differs. |
| AADSTS700212 | The audience differs. |
| AADSTS700213 | The subject identifier differs. |
Get the Master app#
Returns the saved app, the federated credential values, the redirect URIs the app registration needs and how many clients use the app. A secret is never returned.
/v1/workspaces/:workspace_id/entra/master-appWorkspace key + M2M tokencurl https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/master-app \ -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \ -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN"{ "workspace": { "id": "0193f8aa-0000-7000-8000-000000000000", "slug": "acme-master", "name": "Acme" }, "app": { "configured": true, "client_id": "3c1d2e4f-0a9b-4c8d-9e7f-112233445566", "credential_type": "secret", "legacy_settings_credentials": false }, "federation": { "available": true, "issuer": "https://api.scute.io/entra-federation", "subject": "workspace:0193f8aa-0000-7000-8000-000000000000", "audience": "api://AzureADTokenExchange" }, "redirect_uris": [ "https://api.scute.io/v1/auth/entra/auth-oidc", "https://api.scute.io/v1/auth/entra/admin-consent-callback" ], "tenant_id": null, "clients_using": 42}app.credential_type is secret, federated or null when no app is saved. clients_using counts the connected workspaces under the Master that run on the app the tree resolves to (scute_managed).
Test the federated credential#
Asks Microsoft for a token at any tenant with the federated credential. Nothing is saved. Run it against a client's tenant before you switch. Answers 200 with ok: true or ok: false.
/v1/workspaces/:workspace_id/entra/master-app/testWorkspace key + M2M tokencurl -X POST https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/master-app/test \ -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \ -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "tenant_id": "c87af060-e83b-4ed4-bf27-1d6ac3584c90" }'{ "ok": false, "tenant_id": "c87af060-e83b-4ed4-bf27-1d6ac3584c90", "steps": [ { "id": "input", "ok": true }, { "id": "token", "ok": false, "message": "...", "microsoft_code": "AADSTS70021" } ], "warnings": [], "error": "...", "microsoft_code": "AADSTS70021"}Save the Master app#
Saves or switches the Master's app. With credential_type: "federated", Scute first asks Microsoft for a token with the federated credential, and saves the app and drops the stored secret only when Microsoft accepts it. With a client secret, Microsoft is not contacted: send a push afterwards to check it.
/v1/workspaces/:workspace_id/entra/master-appWorkspace key + M2M tokencurl -X PUT https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/master-app \ -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \ -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "credential_type": "federated", "client_id": "3c1d2e4f-0a9b-4c8d-9e7f-112233445566", "tenant_id": "c87af060-e83b-4ed4-bf27-1d6ac3584c90" }'The response is the state from Get the Master app plus changed (whether anything was written) and, for federated, handshake:
{ "workspace": { "id": "0193f8aa-0000-7000-8000-000000000000", "slug": "acme-master", "name": "Acme" }, "app": { "configured": true, "client_id": "3c1d2e4f-0a9b-4c8d-9e7f-112233445566", "credential_type": "federated", "legacy_settings_credentials": false }, "federation": { "available": true, "issuer": "https://api.scute.io/entra-federation", "subject": "workspace:0193f8aa-0000-7000-8000-000000000000", "audience": "api://AzureADTokenExchange" }, "redirect_uris": ["https://api.scute.io/v1/auth/entra/auth-oidc", "https://api.scute.io/v1/auth/entra/admin-consent-callback"], "tenant_id": null, "clients_using": 42, "handshake": { "ok": true, "tenant_id": "c87af060-e83b-4ed4-bf27-1d6ac3584c90", "steps": [{ "id": "input", "ok": true }], "warnings": [] }, "changed": true}A refused handshake returns 422 with the test result and error_code handshake_failed. Nothing changes.
Set credentials (older call)#
The earlier call for the same record. It writes the same fields and returns a short answer.
/v1/workspaces/:workspace_id/entra/credentialsAPI key + M2M tokencurl -X PATCH https://api.scute.io/v1/workspaces/$SCUTE_WORKSPACE_ID/entra/credentials \ -H "Authorization: Bearer $SCUTE_WORKSPACE_KEY" \ -H "X-Authorization: Bearer $SCUTE_M2M_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "client_id": "3c1d2e4f-0a9b-4c8d-9e7f-112233445566", "client_secret": "..." }'{ "ok": true, "credentials_set": true, "credential_type": "secret" }The M2M token's app has to be in the Master workspace. Errors: 403 not_a_master_workspace, 422 missing_credentials, 422 federation_unavailable, 422 handshake_failed.
Issuer endpoints#
Microsoft reads these to verify the assertions Scute signs. They are public and cached for an hour.
Get the issuer configuration#
/entra-federation/.well-known/openid-configurationNonecurl https://api.scute.io/entra-federation/.well-known/openid-configuration{ "issuer": "https://api.scute.io/entra-federation", "jwks_uri": "https://api.scute.io/entra-federation/jwks.json", "response_types_supported": ["id_token"], "subject_types_supported": ["public"], "id_token_signing_alg_values_supported": ["RS256"]}Get the issuer keys#
Returns the public key. The key set is empty while the deployment has no signing key.
/entra-federation/jwks.jsonNonecurl https://api.scute.io/entra-federation/jwks.json{ "keys": [ { "kty": "RSA", "kid": "...", "use": "sig", "alg": "RS256", "n": "...", "e": "AQAB" } ]}