REST identity and permissions
Choose the API family and identity first
REST APIs expose resources through HTTP methods, paths and structured responses. Power BI uses https://api.powerbi.com/v1.0/myorg; Fabric uses https://api.fabric.microsoft.com/v1. A Microsoft Entra OAuth access token is issued for a particular resource and caller. Authentication establishes identity; authorization determines whether that caller may access the endpoint and item. A valid token for one API family is not automatically valid for the other.
Delegated versus application identity
Delegated access acts on behalf of a signed-in user and requires the relevant delegated scopes plus the user’s own permissions. Application identity acts without a signed-in user, using a service principal or managed identity where supported. Check the identity-support table for each endpoint and item type, applicable tenant switches, workspace access and consent rules. Do not treat delegated scopes as application permissions. Power BI service-principal guidance for embedding recommends not adding unnecessary API permissions; separate admin APIs have their own constraints.
Worked example 1 — inventory planning
An analyst needs only to list reports in one test workspace. Choose a supported delegated identity, the endpoint’s read scope and existing workspace access, not a tenant administrator. The following is a request sketch, not a runnable request; mock-ws is intentionally invalid.
GET /v1.0/myorg/groups/mock-ws/reports HTTP/1.1Host: api.powerbi.comAuthorization: Bearer <not-a-real-token>Expected mock outcome: a list of reports the caller may see. A successful token acquisition alone cannot establish access.
Worked example 2 — service identity policy
A nightly Fabric inventory service needs to enumerate items in one workspace. List Items documents support for service principals and managed identities. Confirm applicable tenant settings and actual workspace permissions before scheduling. Prefer a managed identity where the hosting environment and endpoint support it; otherwise use a securely managed service credential. If the tenant disallows the identity, stop. Switching to a more privileged identity just to suppress a 403 is not a repair.
Failure handling and credential boundaries
401 usually points to missing or invalid authentication; 403 generally indicates refusal despite authentication, but inspect the specific service error and documentation. Never log tokens, client secrets, authorization headers or raw sensitive bodies. Acquire credentials through a supported library and approved secret provider in a real service. The lab has no credentials, no network and no token requests.
Practice and references
For a delegated inventory user and a scheduled service, write the API host, endpoint, identity, scope or tenant-setting checks, workspace permission and stop condition. Explain why successful authentication does not grant access. See Fabric identity support and delegated scopes. Continue to metadata and refresh.