Repository navigation
Resolve org via /api/apikey/login instead of GET /v1/organization - #109
Merged
Andrew Kent (realark) merged 1 commit intoOct 7, 2026
Conversation
GET /v1/organization/{id} requires organization read, so evals fail with a
403 for service accounts that only have project access. Restore the login
lookup used before v0.2.12, matching sdk-java.
Fixes SDK-519
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/api/apikey/login instead of GET /v1/organization
Andrew Kent (realark)
approved these changes
Oct 7, 2026
Andrew Kent (realark)
deleted the
paultancre/sdk-519-dotnet-evals-fail-for-project-scoped-service-accounts-get
branch
October 7, 2026 18:15
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.
Fixes SDK-519.
Since v0.2.12 (d5ff948, #95), building an eval resolves the org name with
GET /v1/organization/{id}. That endpoint requiresreadon the organization, so service accounts with only project access ("All projects → Read") fail with:The org is only used for its name in app URLs. This restores the
/api/apikey/loginlookup used through v0.2.11 for bothBraintrustOpenApiClient.FetchProjectAndOrgAsyncand the deprecatedDefaultBraintrustApiClient.ResolveOrg.The dotnet build notes say it mirrors sdk-java, and sdk-java's
BraintrustOpenApiClientstill calls/api/apikey/loginto get the org.Reported by a customer whose CI evals broke after upgrading.
Testing
dotnet test tests/Braintrust.Sdk.Tests: 187 passed.GetProjectUriAsynctest now asserts the org comes from login and/v1/organizationis never called.main:GetProjectUriAsync→ 403Missing read access to organizationhttps://www.braintrust.dev/app/<org>/p/<project>