-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
ServiceAccount API responds a JSON that contains "id" field, but this field is missing in CreateFederatedIdentityProviderResponse struct and produce a JSON marshal error.
Steps to reproduce
item := "aud"
operator := "equals"
value := "someaud"
payload := serviceaccountAPI.CreateFederatedIdentityProviderPayload{
Name: "test",
Issuer: "https://vstoken.dev.azure.com/xxxxxxxxx",
Assertions: []serviceaccountAPI.CreateFederatedIdentityProviderPayloadAssertionsInner{
{
Item: &item,
Operator: &operator,
Value: &value,
},
},
}
_, err = client.DefaultAPI.CreateFederatedIdentityProvider(context.Background(), projectId, saEmail).CreateFederatedIdentityProviderPayload(payload).Execute()
if err != nil {
println(err.Error())
}Current behavior
The code above will print the next line:
json: unknown field "id", status code 201, Body: {"id":"f464d73f-fb1b-467b-bb11-80e0286fe51f","name":"test","issuer":"https://vstoken.dev.azure.com/xxxxxxxxx","assertions":[{"item":"aud","operator":"equals","value":"someaud"}],"createdAt":"2026-03-11T09:39:12.080255397Z","updatedAt":"2026-03-11T09:39:12.080255467Z"}
Expected behavior
I expect an error does NOT occur, as federation is created correctly. It seems to be just a SDK bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working