Add custom_attributes field to OrganizationMembership#82
Open
Add custom_attributes field to OrganizationMembership#82
Conversation
- Add idp_attributes: map() to type spec
- Add :idp_attributes to defstruct
- Add idp_attributes: map["idp_attributes"] || %{} to cast/1 with default empty map
- CI will run tests (local testing was not possible due to dependency issues)
This change adds support for IDP custom attributes on organization
memberships, which are sourced from the identity provider and stored
as customAttributes in the API.
Related to workos/workos PR #50470
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Greptile OverviewGreptile SummaryAdds an Main concern: the PR description indicates the source is Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant API as WorkOS API
participant UM as WorkOS.UserManagement.OrganizationMembership
participant Caller as SDK consumer
API-->>UM: JSON map (decoded)
UM->>UM: cast(map)
UM->>UM: idp_attributes = map["idp_attributes"] || %{}
UM-->>Caller: %OrganizationMembership{... idp_attributes: ...}
|
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.
Summary
Adds
custom_attributesfield toOrganizationMembershipmodel to expose custom attributes from identity providers.Changes
custom_attributesfield to OrganizationMembership type/model{}API Field Details
The field will be present in:
JSON field name:
custom_attributes(snake_case)