key, to graduate, security, to open, castle, key, key, key, key, key
Photo by Alexas_Fotos on Pixabay

Permissions

Part of No-code app integrations

Limiting API credentials to the app's needs

Map app tasks to API permissions, distinguish user and unattended access, protect credentials and check that excess actions are denied.

This is an editorial pen name used by the publication, not a claim of an independently verified personal identity. Original editorial credit: Desk Governance.

List the API operations an app must perform, the data each touches, and whether it acts for a signed-in person or runs unattended. Request the narrowest permission the provider supports. Check both the credential's scope and the account behind it: either may grant more access than the task requires.

Where the credential reaches personal information, Australian Privacy Principle 11 applies: an APP entity must take reasonable steps to protect personal information it holds from misuse, interference and loss, and from unauthorised access, modification or disclosure. A narrow credential is one of those steps.

Map tasks to access

App taskNeeded actionAccess question
Show a case statusRead a caseCan access be limited to cases this user may see?
Add a noteCreate a noteIs permission to edit or delete the case necessary?
Run a nightly importRead selected recordsWhich identity can safely run without a signed-in user?

The table records what to request; it does not prove the provider offers each boundary. Some APIs have narrow scopes; others are broad and depend on the connected account's permissions. If the necessary boundary is unavailable, document the excess access and ask the system owner whether a more limited account or another route is appropriate.

Microsoft Graph illustrates two permission models. Delegated permissions let an app act for a signed-in user within both its granted scope and that user's access.

Application permissions support app-only access, where the app calls Microsoft Graph with its own identity, without a signed-in user. Another API may use a different model.

For SharePoint and OneDrive, Graph offers Selected scopes. Sites.Selected limits an app to a specific site collection, Lists.SelectedOperations.Selected to a specific list, and Files.SelectedOperations.Selected to one or more files. A broad scope such as Files.Read.All gives access as soon as it is consented, while a Selected scope gives no access until a specific resource is assigned.

Delegated vs Application Permissions in Microsoft Graph

  • Delegated PermissionsApp acts on behalf of a signed-in user within the user's granted scope and access rights.
  • Application PermissionsApp runs without a signed-in user, using its own identity. Requires admin consent.

API Access Scope Examples for SharePoint and OneDrive

  1. Files.SelectedOperations.SelectedAccess to one or more specific files only.
  2. Lists.SelectedOperations.SelectedAccess to a specific list only.
  3. Sites.SelectedAccess to a specific site collection only.
  4. Files.Read.AllFull read access to all files after consent — no resource selection required.

Keep the credential under control

Use the platform's supported connection or secret facility and limit who can change or retrieve the credential. In Power Platform, an environment variable of type Secret can reference a secret held in Azure Key Vault, which is currently the only supported secret store. Users who create or use it must have permission to retrieve the secret contents, and a separate vault per environment limits the damage of a breach.

In an app with client-side screens, check that a secret is not embedded in content delivered to users. Keep development and live credentials separate. For unattended work, settle ownership and departure arrangements before relying on a staff member's personal account.

In Power Apps solutions, a connection is the stored credential for a connector, and apps and flows bind to a connection reference rather than to the connection itself. To swap the account behind an app or flow, edit the connection reference in the solution. Power Platform data policies also let administrators control which connectors can be used.

Record the connection owner, intended operations, review date and revocation route. Keep API keys and tokens out of app fields, shared documents, URLs, error messages and logs. OWASP requires non-public REST services to perform access control at each API endpoint. Hiding a button in the app does not stop a caller from trying the underlying API operation.

Best Practices for Managing API Credentials

  • Use platform-supported secret storage (e.g., Azure Key Vault)Ensure secrets are not stored in plain text or shared documents.
  • Separate development and production credentialsPrevent accidental exposure during testing.
  • Avoid embedding secrets in client-side codeProtect credentials from being exposed in browser or app delivery.
  • Assign ownership and departure plans for unattended processesEnsure continuity if staff leave or roles change.

Check and maintain the boundary

With fictional data, check a permitted call and an action outside the approved scope. Confirm that the API refuses the latter; an absent screen control is insufficient.

If users share a connection, check whether its identity can see more data than each user should and how the app and API enforce the user's permitted records. Power Apps, for example, shares some connections with an app while other connection types require each user to create one.

Plan how to rotate and revoke credentials before they expire or an owner leaves. A Microsoft Entra client secret can last at most 24 months, and Microsoft recommends an expiry of less than 12 months. Add the new secret, update the stored reference, confirm the app works, then remove the old secret.

OWASP addresses the need to centralise the storage, provisioning, auditing, rotation and management of secrets to control access to secrets and prevent them from leaking. When an owner leaves or a scope changes, replace the connection or secret straight away and repeat the permitted and denied checks.

Further reading: Overview of Microsoft Graph permissions (learn.microsoft.com).

More from Permissions