Bitzu

AZ-400 ยท Identity, access and permissions

Azure DevOps service connections and PATs

Service connection types and authentication (workload identity federation, service principal, managed identity), scoping and sharing, PAT scopes/lifetime and policies, Microsoft Entra tokens.

Key points

  • Service connection: pipeline access to Azure, no sign-in each time.
  • Azure Resource Manager: workload identity federation recommended (app registration or managed identity), no secret.
  • Scope: needed subscription, management group or resource group; authorize pipelines individually.
  • PAT: tied to a user; organization-scoped, minimal scopes, short-lived.
  • Automation: Microsoft Entra tokens, service principals, managed identities.

Source: https://learn.microsoft.com/en-us/azure/devops/pipelines/library/connect-to-azure?view=azure-devops

Practice questions

Single choice

Which authentication option is recommended for a new Azure Resource Manager service connection?

  1. Workload identity federation
  2. App registration with a client secret
  3. Publish profile
  4. A full-scope personal access token
Show answer

Answer: A. Workload identity federation

Workload identity federation removes secrets and their rotation. Client secrets and publish profiles exist for backward compatibility and edge cases.

Select all that apply

Which practices fit secure use of personal access tokens in Azure DevOps?

  1. Create organization-scoped PATs rather than global ones
  2. Select only the scopes the task requires
  3. Keep the lifetime as short as practical
  4. Share one full-scope PAT across the team for simplicity
  5. Embed the PAT in the pipeline YAML so it is versioned
Show answer

Answer: A. Create organization-scoped PATs rather than global ones, B. Select only the scopes the task requires, C. Keep the lifetime as short as practical

Use organization-scoped PATs, only the scopes you need and the shortest practical lifetime. Sharing one PAT, using full scope for convenience and relying on global PATs (retiring) are all discouraged.

True or false

A personal access token can give its holder more permissions than the user who created it has.

Show answer

Answer: False

False. A PAT identifies its owner and cannot grant more than that owner can do; its scopes can only narrow the access.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More AZ-400 topics in this module