Reapply "feat: Fetch service account OIDC data (#402)"#405
Open
bec-callow-oct wants to merge 1 commit intomainfrom
Open
Reapply "feat: Fetch service account OIDC data (#402)"#405bec-callow-oct wants to merge 1 commit intomainfrom
bec-callow-oct wants to merge 1 commit intomainfrom
Conversation
This reverts commit fac8f8c.
Rose-Northey
approved these changes
Feb 26, 2026
Contributor
Rose-Northey
left a comment
There was a problem hiding this comment.
verified that these changes are the same as the original PR fix.
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.
The changes in #402 were reverted to allow time for a code owners review. This PR restores those changes.
Possible breaking change
The changes to the
OIDCIdentityQuerycould break custom code if any users have made use of this query. Within this client, the query was only used for theNewOIDCIdentity, which does not work.Background
Copied from the original PR description:
[SC-136951]
For the terraform changes in this PR OctopusDeploy/terraform-provider-octopusdeploy#176, the client needs to return the service account external ID so that it can be used as an output by terraform. The Octopus API returns this information via the
/api/serviceaccounts/Users-83/oidcidentities/v1?skip=0&take=1endpoint which theGetOIDCIdentitiesfunction was attempting to call but there were a few problems:api/serviceaccounts/{serviceAccountId}/oidcidentities/v1{?skip,take}) requiresserviceAccountIdbut that was not being provided either as a method parameter or part of the query object.I've added the serviceAccountID to the query object so the original function can hit the correct endpoint now, however the response mapping is still broken.
Testing
Go snippet for testing:
Results
The
GetOIDCIdentitiesfails to map the response correctly so returns no data. The ExternalId and OIDC Identities are successfully returned by the new function.