AZDO.1037 - (Organization) Restrict Personal Access Token creation.
Overviewβ
Personal Access Token creation should be restricted at the organization level.
Rationale: Restricting PAT creation reduces the risk of long-lived credentials being used to access your Azure DevOps organization. Existing personal access tokens remain valid until expiration when the policy is enabled.
Remediation actionβ
Enable the policy to restrict Personal Access Token creation.
- Sign in to your organization.
- Choose Organization settings.
- Select Policies, locate the "Restrict personal access token (PAT) creation" policy and toggle it to on.
Results: With the policy enabled, users cannot create new Personal Access Tokens unless explicitly allowed through the allow list.
Related linksβ
Test Metadataβ
| Field | Value |
|---|---|
| Test ID | AZDO.1037 |
| Severity | High |
| Suite | Maester |
| Category | Azure DevOps |
| PowerShell test | Test-AzdoDisablePATCreation |
| Services | AzureDevOps |
| Learn more | https://learn.microsoft.com/azure/devops/organizations/accounts/manage-pats-with-policies-for-administrators?view=azure-devops |
| Tags | AZDO, AZDO.1037 |
Sourceβ
- Test:
tests/Maester/AzureDevOps/Test.AZDO.1037.ps1 - Documentation:
tests/Maester/AzureDevOps/Test.AZDO.1037.md
