Repository navigation
Add native Azure DevOps workload identity service endpoint - #1622
Open
Przemyslaw Kalucki (PAKalucki) wants to merge 3 commits into
Open
Przemyslaw Kalucki (PAKalucki) wants to merge 3 commits into
Przemyslaw Kalucki (PAKalucki) wants to merge 3 commits into
Conversation
Author
@microsoft-github-policy-service agree |
Przemyslaw Kalucki (PAKalucki)
marked this pull request as ready for review
November 18, 2026 22:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Azure DevOps now has a native
workloadidentityuserservice connection for accessing Azure DevOps with an Entra app registration or user-assigned managed identity. The provider cannot currently manage this connection type:azuredevops_serviceendpoint_azuredevopsmanages the deprecatedAZDOAPIextension integration, and anazurermconnection is rejected by tasks expectingWorkloadIdentityUser.Add
azuredevops_serviceendpoint_workload_identitywith create/read/update/delete and project-qualified import support. It accepts an existing identity, exports the federation issuer/subject and readiness, and supports an explicit draft followed by a separate finalization apply. There are no dependency changes or behavior changes to existing resources.Live testing informed the implementation:
object_idmust identify the app registration, whereas organization entitlement uses the separate enterprise application/service principal object ID. Managed identities use their principal object ID.draft = false.deep=false; the identity and organization membership remain separately managed.Upstream authentication limitations
App-only provider authentication was tested with both identity types: create a draft, configure federation separately, then finalize the same connection. All four connections created through user and app-only provider authentication subsequently passed real pipeline token exchange and private-project access checks without a PAT or
System.AccessTokenheader.This does not remove the backend limitations reported in #1577. Renaming an already-ready app-registration connection under app-only authentication failed while Azure DevOps attempted federated-credential cleanup; a subsequent validation apply recovered it. Deleting either identity type under app-only authentication also failed at credential cleanup despite
deep=false. The same deletions succeeded using delegated user authentication with the corresponding Entra/Azure permissions. These limits are documented; the provider does not conceal them or claim a fully app-only lifecycle.Test Result
Live tests ran on 2026-11-18 in an isolated personal Azure DevOps organization and Entra tenant, using local state, Terraform 1.14.7, Go 1.26.3, and this provider build. Only zero-cost resource types, Basic memberships within the five free seats, and agentless server jobs were used.
Each of the four pipeline jobs used
InvokeRESTAPI@1withconnectionType: connectedServiceNameAzureDevOps, an expected-principal assertion againstconnectionData, and an expected-project assertion against a private project. Earlier runs encountered Entra propagation errors; run 5 passed all eight checks. Private ephemeral pipeline logs and Terraform/Go results were retained locally before deleting the test projects.Local checks passed:
go build ./...,make test, andgo test -tags resource_serviceendpoint_workload_identity ./...; 20 focused unit test functions with table-driven cases.make depscheck: no module/vendor changes. Repository Go 1.25 requirement unchanged.make fmtcheck,make terrafmt-check, changed-page spelling, both HCL examples usingterraform validate, and changed-pagetfproviderdocs check.Repository-wide
tfproviderdocs check -provider-name=azuredevopsstill reports 10 existing frontmatter errors in unchanged pages. The full live acceptance suite for unrelated resources was not run. The new opt-in tests document theirAZDO_WIF_*prerequisites in source and must run each identity variant with the matching environment.Upstream Dependency Check, Go lint, Unit Test and Terrafmt workflows for
d1d6309brequire maintainer approval (action_required); they have not executed. Unit Test run.All Submissions
Does this introduce a breaking change?
Related Issue(s)
Fixes #1577. Reuses the existing feature request instead of opening a duplicate.