diff --git a/.last-synced-sha b/.last-synced-sha
index f72eb0e2..be98ab48 100644
--- a/.last-synced-sha
+++ b/.last-synced-sha
@@ -1 +1 @@
-92db0495807c86fbbc4d45bd266a6c1f5bcbb59c
+f908f520f9fcd63dfd42ed35b7f141a65b61609b
diff --git a/.oagen-manifest.json b/.oagen-manifest.json
index 9e4bd292..36949eac 100644
--- a/.oagen-manifest.json
+++ b/.oagen-manifest.json
@@ -1,7 +1,7 @@
{
"version": 2,
"language": "dotnet",
- "generatedAt": "2026-04-28T16:33:51.142Z",
+ "generatedAt": "2026-04-30T20:02:34.086Z",
"files": [
"src/WorkOS.net/Client/Utilities/EventSchemaDiscriminatorConverter.cs",
"src/WorkOS.net/Client/WorkOSClient.Generated.cs",
@@ -158,6 +158,9 @@
"src/WorkOS.net/Entities/DsyncGroupUserAdded.cs",
"src/WorkOS.net/Entities/DsyncGroupUserAddedData.cs",
"src/WorkOS.net/Entities/DsyncGroupUserRemoved.cs",
+ "src/WorkOS.net/Entities/DsyncTokenCreated.cs",
+ "src/WorkOS.net/Entities/DsyncTokenCreatedData.cs",
+ "src/WorkOS.net/Entities/DsyncTokenDeleted.cs",
"src/WorkOS.net/Entities/DsyncUserCreated.cs",
"src/WorkOS.net/Entities/DsyncUserDeleted.cs",
"src/WorkOS.net/Entities/DsyncUserUpdated.cs",
@@ -302,6 +305,7 @@
"src/WorkOS.net/Entities/UserManagementLoginRequest.cs",
"src/WorkOS.net/Entities/UserObject.cs",
"src/WorkOS.net/Entities/UserOrganizationMembershipBaseListData.cs",
+ "src/WorkOS.net/Entities/UserOrganizationMembershipBaseWithUser.cs",
"src/WorkOS.net/Entities/UserUpdated.cs",
"src/WorkOS.net/Entities/ValidateApiKey.cs",
"src/WorkOS.net/Entities/VaultByokKeyVerificationCompleted.cs",
@@ -466,6 +470,9 @@
"test/WorkOSTests/testdata/api_key_revoked_data_owner.json",
"test/WorkOSTests/testdata/api_key_revoked_nulls.json",
"test/WorkOSTests/testdata/api_key_validation_response.json",
+ "test/WorkOSTests/testdata/api_key_validation_response_api_key.json",
+ "test/WorkOSTests/testdata/api_key_validation_response_api_key_nulls.json",
+ "test/WorkOSTests/testdata/api_key_validation_response_api_key_owner.json",
"test/WorkOSTests/testdata/api_key_validation_response_nulls.json",
"test/WorkOSTests/testdata/api_key_with_value.json",
"test/WorkOSTests/testdata/api_key_with_value_nulls.json",
@@ -752,6 +759,14 @@
"test/WorkOSTests/testdata/dsync_group_user_removed.json",
"test/WorkOSTests/testdata/dsync_group_user_removed_data.json",
"test/WorkOSTests/testdata/dsync_group_user_removed_nulls.json",
+ "test/WorkOSTests/testdata/dsync_token_created.json",
+ "test/WorkOSTests/testdata/dsync_token_created_data.json",
+ "test/WorkOSTests/testdata/dsync_token_created_data_nulls.json",
+ "test/WorkOSTests/testdata/dsync_token_created_nulls.json",
+ "test/WorkOSTests/testdata/dsync_token_deleted.json",
+ "test/WorkOSTests/testdata/dsync_token_deleted_data.json",
+ "test/WorkOSTests/testdata/dsync_token_deleted_data_nulls.json",
+ "test/WorkOSTests/testdata/dsync_token_deleted_nulls.json",
"test/WorkOSTests/testdata/dsync_user_created.json",
"test/WorkOSTests/testdata/dsync_user_created_nulls.json",
"test/WorkOSTests/testdata/dsync_user_deleted.json",
@@ -914,6 +929,7 @@
"test/WorkOSTests/testdata/list_empty_user_invite.json",
"test/WorkOSTests/testdata/list_empty_user_organization_membership.json",
"test/WorkOSTests/testdata/list_empty_user_organization_membership_base_list_data.json",
+ "test/WorkOSTests/testdata/list_empty_user_organization_membership_base_with_user.json",
"test/WorkOSTests/testdata/list_empty_user_sessions_list_item.json",
"test/WorkOSTests/testdata/list_empty_webhook_endpoint_json.json",
"test/WorkOSTests/testdata/list_event_schema.json",
@@ -925,6 +941,7 @@
"test/WorkOSTests/testdata/list_user_invite.json",
"test/WorkOSTests/testdata/list_user_organization_membership.json",
"test/WorkOSTests/testdata/list_user_organization_membership_base_list_data.json",
+ "test/WorkOSTests/testdata/list_user_organization_membership_base_with_user.json",
"test/WorkOSTests/testdata/list_user_sessions_list_item.json",
"test/WorkOSTests/testdata/list_webhook_endpoint_json.json",
"test/WorkOSTests/testdata/magic_auth.json",
@@ -1145,6 +1162,8 @@
"test/WorkOSTests/testdata/user_organization_membership.json",
"test/WorkOSTests/testdata/user_organization_membership_base_list_data.json",
"test/WorkOSTests/testdata/user_organization_membership_base_list_data_nulls.json",
+ "test/WorkOSTests/testdata/user_organization_membership_base_with_user.json",
+ "test/WorkOSTests/testdata/user_organization_membership_base_with_user_nulls.json",
"test/WorkOSTests/testdata/user_organization_membership_nulls.json",
"test/WorkOSTests/testdata/user_sessions_impersonator.json",
"test/WorkOSTests/testdata/user_sessions_impersonator_nulls.json",
diff --git a/src/WorkOS.net/Client/Utilities/EventSchemaDiscriminatorConverter.cs b/src/WorkOS.net/Client/Utilities/EventSchemaDiscriminatorConverter.cs
index 902511c1..06ec77ac 100644
--- a/src/WorkOS.net/Client/Utilities/EventSchemaDiscriminatorConverter.cs
+++ b/src/WorkOS.net/Client/Utilities/EventSchemaDiscriminatorConverter.cs
@@ -56,6 +56,8 @@ public override object ReadJson(Newtonsoft.Json.JsonReader reader, Type objectTy
case "dsync.group.created": target = new DsyncGroupCreated(); break;
case "dsync.group.deleted": target = new DsyncGroupDeleted(); break;
case "dsync.group.updated": target = new DsyncGroupUpdated(); break;
+ case "dsync.token.created": target = new DsyncTokenCreated(); break;
+ case "dsync.token.deleted": target = new DsyncTokenDeleted(); break;
case "dsync.group.user_added": target = new DsyncGroupUserAdded(); break;
case "dsync.user.created": target = new DsyncUserCreated(); break;
case "dsync.user.deleted": target = new DsyncUserDeleted(); break;
diff --git a/src/WorkOS.net/Entities/ApiKey.cs b/src/WorkOS.net/Entities/ApiKey.cs
index 899d2385..b8e85fa5 100644
--- a/src/WorkOS.net/Entities/ApiKey.cs
+++ b/src/WorkOS.net/Entities/ApiKey.cs
@@ -5,7 +5,7 @@ namespace WorkOS
using System;
using System.Collections.Generic;
- /// The API Key object if the value is valid, or `null` if invalid.
+ /// Represents an api key.
public class ApiKey
{
diff --git a/src/WorkOS.net/Entities/ApiKeyCreatedDataOwner.cs b/src/WorkOS.net/Entities/ApiKeyCreatedDataOwner.cs
index 8e847512..62c13d78 100644
--- a/src/WorkOS.net/Entities/ApiKeyCreatedDataOwner.cs
+++ b/src/WorkOS.net/Entities/ApiKeyCreatedDataOwner.cs
@@ -3,7 +3,7 @@
namespace WorkOS
{
- /// The owner of the API key.
+ /// Represents an api key created data owner.
public class ApiKeyCreatedDataOwner
{
diff --git a/src/WorkOS.net/Entities/DirectoryUser.cs b/src/WorkOS.net/Entities/DirectoryUser.cs
index c0829c34..cac6228c 100644
--- a/src/WorkOS.net/Entities/DirectoryUser.cs
+++ b/src/WorkOS.net/Entities/DirectoryUser.cs
@@ -35,6 +35,9 @@ public class DirectoryUser
/// The last name of the user.
public string? LastName { get; set; }
+ /// The full name of the user.
+ public string? Name { get; set; }
+
/// A list of email addresses for the user.
[System.Obsolete("This field is deprecated.")]
public List? Emails { get; set; }
diff --git a/src/WorkOS.net/Entities/DirectoryUserWithGroups.cs b/src/WorkOS.net/Entities/DirectoryUserWithGroups.cs
index e311b11b..b1ab0360 100644
--- a/src/WorkOS.net/Entities/DirectoryUserWithGroups.cs
+++ b/src/WorkOS.net/Entities/DirectoryUserWithGroups.cs
@@ -35,6 +35,9 @@ public class DirectoryUserWithGroups
/// The last name of the user.
public string? LastName { get; set; }
+ /// The full name of the user.
+ public string? Name { get; set; }
+
/// A list of email addresses for the user.
[System.Obsolete("This field is deprecated.")]
public List? Emails { get; set; }
@@ -69,8 +72,8 @@ public class DirectoryUserWithGroups
/// An ISO 8601 timestamp.
public DateTimeOffset UpdatedAt { get; set; }
- /// The directory groups the user belongs to. Use the List Directory Groups endpoint with a user filter instead.
- [System.Obsolete("This field is deprecated.")]
+ /// The directory groups the user belongs to. Deprecated: starting May 1, 2026, this field returns an empty array by default for newly created teams. Existing teams currently depending on this field should migrate to the new access pattern for better throughput performance — the field is unbounded by user, so users with many group memberships produce large, slow response payloads. Use the List Directory Groups endpoint with a `user` filter to fetch a user's group memberships.
+ [System.Obsolete("Deprecated. starting May 1, 2026, this field returns an empty array by default for newly created teams.")]
public List Groups { get; set; } = default!;
///
diff --git a/src/WorkOS.net/Entities/DsyncTokenCreated.cs b/src/WorkOS.net/Entities/DsyncTokenCreated.cs
new file mode 100644
index 00000000..77d481b5
--- /dev/null
+++ b/src/WorkOS.net/Entities/DsyncTokenCreated.cs
@@ -0,0 +1,15 @@
+// This file is auto-generated by oagen. Do not edit.
+
+namespace WorkOS
+{
+ using System;
+
+ /// Represents a dsync token created.
+ public class DsyncTokenCreated : EventSchema
+ {
+
+ /// The event payload.
+ public new DsyncTokenCreatedData Data { get; set; } = default!;
+ public new EventContext? Context { get; set; }
+ }
+}
diff --git a/src/WorkOS.net/Entities/DsyncTokenCreatedData.cs b/src/WorkOS.net/Entities/DsyncTokenCreatedData.cs
new file mode 100644
index 00000000..8321fe3f
--- /dev/null
+++ b/src/WorkOS.net/Entities/DsyncTokenCreatedData.cs
@@ -0,0 +1,32 @@
+// This file is auto-generated by oagen. Do not edit.
+
+namespace WorkOS
+{
+ using System;
+
+ /// The event payload.
+ public class DsyncTokenCreatedData
+ {
+
+ /// Distinguishes the directory token object.
+ public string Object { get; internal set; } = "directory_token";
+
+ /// Unique identifier of the directory token.
+ public string Id { get; set; } = default!;
+
+ /// The ID of the directory the token authenticates to.
+ public string DirectoryId { get; set; } = default!;
+
+ /// The ID of the organization the directory belongs to.
+ public string? OrganizationId { get; set; }
+
+ /// The trailing characters of the bearer token, for identification only. The full token value is never included in events.
+ public string TokenSuffix { get; set; } = default!;
+
+ /// An ISO 8601 timestamp.
+ public DateTimeOffset CreatedAt { get; set; }
+
+ /// The timestamp at which the token expires, or null for tokens without a scheduled expiration. Used during rotation to indicate the grace window for the outgoing token.
+ public DateTimeOffset? ExpiresAt { get; set; }
+ }
+}
diff --git a/src/WorkOS.net/Entities/DsyncTokenDeleted.cs b/src/WorkOS.net/Entities/DsyncTokenDeleted.cs
new file mode 100644
index 00000000..c268a010
--- /dev/null
+++ b/src/WorkOS.net/Entities/DsyncTokenDeleted.cs
@@ -0,0 +1,15 @@
+// This file is auto-generated by oagen. Do not edit.
+
+namespace WorkOS
+{
+ using System;
+
+ /// Represents a dsync token deleted.
+ public class DsyncTokenDeleted : EventSchema
+ {
+
+ /// The event payload.
+ public new DsyncTokenCreatedData Data { get; set; } = default!;
+ public new EventContext? Context { get; set; }
+ }
+}
diff --git a/src/WorkOS.net/Entities/DsyncUserUpdatedData.cs b/src/WorkOS.net/Entities/DsyncUserUpdatedData.cs
index 1cf53367..eedc9606 100644
--- a/src/WorkOS.net/Entities/DsyncUserUpdatedData.cs
+++ b/src/WorkOS.net/Entities/DsyncUserUpdatedData.cs
@@ -35,6 +35,9 @@ public class DsyncUserUpdatedData
/// The last name of the user.
public string? LastName { get; set; }
+ /// The full name of the user.
+ public string? Name { get; set; }
+
/// A list of email addresses for the user.
[System.Obsolete("This field is deprecated.")]
public List? Emails { get; set; }
diff --git a/src/WorkOS.net/Entities/OrganizationMembership.cs b/src/WorkOS.net/Entities/OrganizationMembership.cs
index 3c1c9497..704cf725 100644
--- a/src/WorkOS.net/Entities/OrganizationMembership.cs
+++ b/src/WorkOS.net/Entities/OrganizationMembership.cs
@@ -46,6 +46,9 @@ public class OrganizationMembership
/// The primary role assigned to the user within the organization.
public AddRolePermission Role { get; set; } = default!;
+ /// The user that belongs to the organization through this membership.
+ public User User { get; set; } = default!;
+
///
/// Typed accessor for . Returns the value stored under
/// coerced to , or the default
diff --git a/src/WorkOS.net/Entities/Profile.cs b/src/WorkOS.net/Entities/Profile.cs
index 2daf0e09..89be7f7b 100644
--- a/src/WorkOS.net/Entities/Profile.cs
+++ b/src/WorkOS.net/Entities/Profile.cs
@@ -39,6 +39,9 @@ public class Profile
/// The user's last name.
public string? LastName { get; set; }
+ /// The user's full name.
+ public string? Name { get; set; }
+
/// The role assigned to the user within the organization, if applicable.
public AddRolePermission? Role { get; set; }
diff --git a/src/WorkOS.net/Entities/UserOrganizationMembershipBaseWithUser.cs b/src/WorkOS.net/Entities/UserOrganizationMembershipBaseWithUser.cs
new file mode 100644
index 00000000..ef1adce0
--- /dev/null
+++ b/src/WorkOS.net/Entities/UserOrganizationMembershipBaseWithUser.cs
@@ -0,0 +1,86 @@
+// This file is auto-generated by oagen. Do not edit.
+
+namespace WorkOS
+{
+ using System;
+ using System.Collections.Generic;
+ using Newtonsoft.Json;
+ using STJS = System.Text.Json.Serialization;
+
+ /// Represents an user organization membership base with user.
+ public class UserOrganizationMembershipBaseWithUser
+ {
+
+ /// Distinguishes the organization membership object.
+ public string Object { get; internal set; } = "organization_membership";
+
+ /// The unique ID of the organization membership.
+ public string Id { get; set; } = default!;
+
+ /// The ID of the user.
+ public string UserId { get; set; } = default!;
+
+ /// The ID of the organization which the user belongs to.
+ public string OrganizationId { get; set; } = default!;
+
+ /// The status of the organization membership. One of `active`, `inactive`, or `pending`.
+ [JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
+ [STJS.JsonIgnore(Condition = STJS.JsonIgnoreCondition.WhenWritingDefault)]
+ public OrganizationMembershipCreatedDataStatus Status { get; set; }
+
+ /// Whether this organization membership is managed by a directory sync connection.
+ public bool DirectoryManaged { get; set; }
+
+ /// The name of the organization which the user belongs to.
+ public string? OrganizationName { get; set; }
+
+ /// An object containing IdP-sourced attributes from the linked [Directory User](https://workos.com/docs/reference/directory-sync/directory-user) or [SSO Profile](https://workos.com/docs/reference/sso/profile). Directory User attributes take precedence when both are linked.
+ public Dictionary? CustomAttributes { get; set; }
+
+ /// An ISO 8601 timestamp.
+ public DateTimeOffset CreatedAt { get; set; }
+
+ /// An ISO 8601 timestamp.
+ public DateTimeOffset UpdatedAt { get; set; }
+
+ /// The user that belongs to the organization through this membership.
+ public User User { get; set; } = default!;
+
+ ///
+ /// Typed accessor for . Returns the value stored under
+ /// coerced to , or the default
+ /// value when the key is missing or the value is not convertible.
+ ///
+ /// Expected value type.
+ /// The key to look up.
+ public T? GetCustomAttributesAttribute(string key)
+ {
+ if (this.CustomAttributes == null)
+ {
+ return default;
+ }
+
+ if (!this.CustomAttributes.TryGetValue(key, out var value))
+ {
+ return default;
+ }
+
+ if (value is T typed)
+ {
+ return typed;
+ }
+
+ if (value is Newtonsoft.Json.Linq.JToken token)
+ {
+ return token.ToObject();
+ }
+
+ if (value is System.Text.Json.JsonElement element)
+ {
+ return System.Text.Json.JsonSerializer.Deserialize(element.GetRawText());
+ }
+
+ return default;
+ }
+ }
+}
diff --git a/src/WorkOS.net/Enums/EventContextActorSource.cs b/src/WorkOS.net/Enums/EventContextActorSource.cs
index 33f7a66d..8408eba9 100644
--- a/src/WorkOS.net/Enums/EventContextActorSource.cs
+++ b/src/WorkOS.net/Enums/EventContextActorSource.cs
@@ -18,6 +18,8 @@ public enum EventContextActorSource
Api,
[EnumMember(Value = "dashboard")]
Dashboard,
+ [EnumMember(Value = "admin_portal")]
+ AdminPortal,
[EnumMember(Value = "system")]
System,
}
diff --git a/src/WorkOS.net/Services/Authorization/AuthorizationService.cs b/src/WorkOS.net/Services/Authorization/AuthorizationService.cs
index be4bc53b..ee509553 100644
--- a/src/WorkOS.net/Services/Authorization/AuthorizationService.cs
+++ b/src/WorkOS.net/Services/Authorization/AuthorizationService.cs
@@ -608,14 +608,14 @@ public virtual Task DeleteResourceByExternalId(string organizationId, string res
/// Request options.
/// Per-request configuration overrides.
/// Cancellation token.
- /// A page of results.
- public virtual async Task> ListMembershipsForResourceByExternalIdAsync(string organizationId, string resourceTypeSlug, string externalId, AuthorizationListMembershipsForResourceByExternalIdOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
+ /// A page of results.
+ public virtual async Task> ListMembershipsForResourceByExternalIdAsync(string organizationId, string resourceTypeSlug, string externalId, AuthorizationListMembershipsForResourceByExternalIdOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
{
- return await this.GetAsync>($"/authorization/organizations/{Uri.EscapeDataString(organizationId)}/resources/{Uri.EscapeDataString(resourceTypeSlug)}/{Uri.EscapeDataString(externalId)}/organization_memberships", options, requestOptions, cancellationToken);
+ return await this.GetAsync>($"/authorization/organizations/{Uri.EscapeDataString(organizationId)}/resources/{Uri.EscapeDataString(resourceTypeSlug)}/{Uri.EscapeDataString(externalId)}/organization_memberships", options, requestOptions, cancellationToken);
}
/// Compatibility wrapper for .
- public virtual Task> ListMembershipsForResourceByExternalId(string organizationId, string resourceTypeSlug, string externalId, AuthorizationListMembershipsForResourceByExternalIdOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
+ public virtual Task> ListMembershipsForResourceByExternalId(string organizationId, string resourceTypeSlug, string externalId, AuthorizationListMembershipsForResourceByExternalIdOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
{
return this.ListMembershipsForResourceByExternalIdAsync(organizationId, resourceTypeSlug, externalId, options, requestOptions, cancellationToken);
}
@@ -627,10 +627,10 @@ public virtual Task> ListMemb
/// Request options.
/// Per-request configuration overrides.
/// Cancellation token.
- /// An async sequence of items.
- public virtual IAsyncEnumerable ListMembershipsForResourceByExternalIdAutoPagingAsync(string organizationId, string resourceTypeSlug, string externalId, AuthorizationListMembershipsForResourceByExternalIdOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
+ /// An async sequence of items.
+ public virtual IAsyncEnumerable ListMembershipsForResourceByExternalIdAutoPagingAsync(string organizationId, string resourceTypeSlug, string externalId, AuthorizationListMembershipsForResourceByExternalIdOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
{
- return this.ListAutoPagingAsync($"/authorization/organizations/{Uri.EscapeDataString(organizationId)}/resources/{Uri.EscapeDataString(resourceTypeSlug)}/{Uri.EscapeDataString(externalId)}/organization_memberships", options, requestOptions, cancellationToken);
+ return this.ListAutoPagingAsync($"/authorization/organizations/{Uri.EscapeDataString(organizationId)}/resources/{Uri.EscapeDataString(resourceTypeSlug)}/{Uri.EscapeDataString(externalId)}/organization_memberships", options, requestOptions, cancellationToken);
}
/// List resources
@@ -831,14 +831,14 @@ public virtual Task DeleteResource(string resourceId, AuthorizationDeleteResourc
/// Request options.
/// Per-request configuration overrides.
/// Cancellation token.
- /// A page of results.
- public virtual async Task> ListMembershipsForResourceAsync(string resourceId, AuthorizationListMembershipsForResourceOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
+ /// A page of results.
+ public virtual async Task> ListMembershipsForResourceAsync(string resourceId, AuthorizationListMembershipsForResourceOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
{
- return await this.GetAsync>($"/authorization/resources/{Uri.EscapeDataString(resourceId)}/organization_memberships", options, requestOptions, cancellationToken);
+ return await this.GetAsync>($"/authorization/resources/{Uri.EscapeDataString(resourceId)}/organization_memberships", options, requestOptions, cancellationToken);
}
/// Compatibility wrapper for .
- public virtual Task> ListMembershipsForResource(string resourceId, AuthorizationListMembershipsForResourceOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
+ public virtual Task> ListMembershipsForResource(string resourceId, AuthorizationListMembershipsForResourceOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
{
return this.ListMembershipsForResourceAsync(resourceId, options, requestOptions, cancellationToken);
}
@@ -848,10 +848,10 @@ public virtual Task> ListMemb
/// Request options.
/// Per-request configuration overrides.
/// Cancellation token.
- /// An async sequence of items.
- public virtual IAsyncEnumerable ListMembershipsForResourceAutoPagingAsync(string resourceId, AuthorizationListMembershipsForResourceOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
+ /// An async sequence of items.
+ public virtual IAsyncEnumerable ListMembershipsForResourceAutoPagingAsync(string resourceId, AuthorizationListMembershipsForResourceOptions? options = null, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
{
- return this.ListAutoPagingAsync($"/authorization/resources/{Uri.EscapeDataString(resourceId)}/organization_memberships", options, requestOptions, cancellationToken);
+ return this.ListAutoPagingAsync($"/authorization/resources/{Uri.EscapeDataString(resourceId)}/organization_memberships", options, requestOptions, cancellationToken);
}
/// List environment roles
diff --git a/test/WorkOSTests/Tests/AuthorizationServiceTest.cs b/test/WorkOSTests/Tests/AuthorizationServiceTest.cs
index 6c1db3de..3f0c41a5 100644
--- a/test/WorkOSTests/Tests/AuthorizationServiceTest.cs
+++ b/test/WorkOSTests/Tests/AuthorizationServiceTest.cs
@@ -283,7 +283,7 @@ public async Task TestDeleteResourceByExternalIdAsync()
[Fact]
public async Task TestListMembershipsForResourceByExternalIdAsync()
{
- var fixture = System.IO.File.ReadAllText("testdata/list_user_organization_membership_base_list_data.json");
+ var fixture = System.IO.File.ReadAllText("testdata/list_user_organization_membership_base_with_user.json");
this.httpMock.MockResponse(HttpMethod.Get, "/authorization/organizations/test_organization_id/resources/test_resource_type_slug/test_external_id/organization_memberships", HttpStatusCode.OK, fixture);
var result = await this.service.ListMembershipsForResourceByExternalIdAsync("test_organization_id", "test_resource_type_slug", "test_external_id", new AuthorizationListMembershipsForResourceByExternalIdOptions());
Assert.NotNull(result);
@@ -375,7 +375,7 @@ public async Task TestDeleteResourceAsync()
[Fact]
public async Task TestListMembershipsForResourceAsync()
{
- var fixture = System.IO.File.ReadAllText("testdata/list_user_organization_membership_base_list_data.json");
+ var fixture = System.IO.File.ReadAllText("testdata/list_user_organization_membership_base_with_user.json");
this.httpMock.MockResponse(HttpMethod.Get, "/authorization/resources/test_resource_id/organization_memberships", HttpStatusCode.OK, fixture);
var result = await this.service.ListMembershipsForResourceAsync("test_resource_id", new AuthorizationListMembershipsForResourceOptions());
Assert.NotNull(result);
@@ -678,12 +678,12 @@ public async Task TestListRoleAssignmentsAutoPagingAsyncEmpty()
[Fact]
public async Task TestListMembershipsForResourceByExternalIdAutoPagingAsync()
{
- var fixture = System.IO.File.ReadAllText("testdata/user_organization_membership_base_list_data.json");
+ var fixture = System.IO.File.ReadAllText("testdata/user_organization_membership_base_with_user.json");
var page1 = "{\"data\":[" + fixture + "],\"list_metadata\":{\"before\":null,\"after\":\"cursor_123\"}}";
var page2 = "{\"data\":[" + fixture + "],\"list_metadata\":{\"before\":null,\"after\":null}}";
this.httpMock.MockSequentialResponses(HttpMethod.Get, "/authorization/organizations/test_organization_id/resources/test_resource_type_slug/test_external_id/organization_memberships", HttpStatusCode.OK, new[] { page1, page2 });
- var items = new List();
+ var items = new List();
await foreach (var item in this.service.ListMembershipsForResourceByExternalIdAutoPagingAsync("test_organization_id", "test_resource_type_slug", "test_external_id", new AuthorizationListMembershipsForResourceByExternalIdOptions()))
{
items.Add(item);
@@ -698,7 +698,7 @@ public async Task TestListMembershipsForResourceByExternalIdAutoPagingAsyncEmpty
var empty = "{\"data\":[],\"list_metadata\":{\"before\":null,\"after\":null}}";
this.httpMock.MockSequentialResponses(HttpMethod.Get, "/authorization/organizations/test_organization_id/resources/test_resource_type_slug/test_external_id/organization_memberships", HttpStatusCode.OK, new[] { empty });
- var items = new List();
+ var items = new List();
await foreach (var item in this.service.ListMembershipsForResourceByExternalIdAutoPagingAsync("test_organization_id", "test_resource_type_slug", "test_external_id", new AuthorizationListMembershipsForResourceByExternalIdOptions()))
{
items.Add(item);
@@ -742,12 +742,12 @@ public async Task TestListResourcesAutoPagingAsyncEmpty()
[Fact]
public async Task TestListMembershipsForResourceAutoPagingAsync()
{
- var fixture = System.IO.File.ReadAllText("testdata/user_organization_membership_base_list_data.json");
+ var fixture = System.IO.File.ReadAllText("testdata/user_organization_membership_base_with_user.json");
var page1 = "{\"data\":[" + fixture + "],\"list_metadata\":{\"before\":null,\"after\":\"cursor_123\"}}";
var page2 = "{\"data\":[" + fixture + "],\"list_metadata\":{\"before\":null,\"after\":null}}";
this.httpMock.MockSequentialResponses(HttpMethod.Get, "/authorization/resources/test_resource_id/organization_memberships", HttpStatusCode.OK, new[] { page1, page2 });
- var items = new List();
+ var items = new List();
await foreach (var item in this.service.ListMembershipsForResourceAutoPagingAsync("test_resource_id", new AuthorizationListMembershipsForResourceOptions()))
{
items.Add(item);
@@ -762,7 +762,7 @@ public async Task TestListMembershipsForResourceAutoPagingAsyncEmpty()
var empty = "{\"data\":[],\"list_metadata\":{\"before\":null,\"after\":null}}";
this.httpMock.MockSequentialResponses(HttpMethod.Get, "/authorization/resources/test_resource_id/organization_memberships", HttpStatusCode.OK, new[] { empty });
- var items = new List();
+ var items = new List();
await foreach (var item in this.service.ListMembershipsForResourceAutoPagingAsync("test_resource_id", new AuthorizationListMembershipsForResourceOptions()))
{
items.Add(item);
diff --git a/test/WorkOSTests/Tests/UserManagementServiceTest.cs b/test/WorkOSTests/Tests/UserManagementServiceTest.cs
index 360b7352..98dc8d3d 100644
--- a/test/WorkOSTests/Tests/UserManagementServiceTest.cs
+++ b/test/WorkOSTests/Tests/UserManagementServiceTest.cs
@@ -418,7 +418,7 @@ public async Task TestUpdateJWTTemplateAsync()
options.Content = "test_content";
var result = await this.service.UpdateJWTTemplateAsync(options);
Assert.NotNull(result);
- Assert.Equal("{\"iss\": \"{{environment.id}}\", \"sub\": \"{{user.id}}\"}", result.Content);
+ Assert.Equal("{\"urn:myapp:full_name\": \"{{user.first_name}} {{user.last_name}}\", \"urn:myapp:email\": \"{{user.email}}\"}", result.Content);
Assert.Equal("2026-01-15T12:00:00.000Z", result.CreatedAt);
this.httpMock.AssertRequestWasMade(HttpMethod.Put, "/user_management/jwt_template");
await this.httpMock.AssertRequestBodyContainsAsync("content", "test_content");
diff --git a/test/WorkOSTests/testdata/api_key_validation_response_api_key.json b/test/WorkOSTests/testdata/api_key_validation_response_api_key.json
new file mode 100644
index 00000000..e05b1db2
--- /dev/null
+++ b/test/WorkOSTests/testdata/api_key_validation_response_api_key.json
@@ -0,0 +1,17 @@
+{
+ "object": "api_key",
+ "id": "api_key_01EHZNVPK3SFK441A1RGBFSHRT",
+ "owner": {
+ "type": "organization",
+ "id": "org_01EHZNVPK3SFK441A1RGBFSHRT"
+ },
+ "name": "Production API Key",
+ "obfuscated_value": "sk_...3456",
+ "last_used_at": null,
+ "permissions": [
+ "posts:read",
+ "posts:write"
+ ],
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "updated_at": "2026-01-15T12:00:00.000Z"
+}
diff --git a/test/WorkOSTests/testdata/api_key_validation_response_api_key_nulls.json b/test/WorkOSTests/testdata/api_key_validation_response_api_key_nulls.json
new file mode 100644
index 00000000..e05b1db2
--- /dev/null
+++ b/test/WorkOSTests/testdata/api_key_validation_response_api_key_nulls.json
@@ -0,0 +1,17 @@
+{
+ "object": "api_key",
+ "id": "api_key_01EHZNVPK3SFK441A1RGBFSHRT",
+ "owner": {
+ "type": "organization",
+ "id": "org_01EHZNVPK3SFK441A1RGBFSHRT"
+ },
+ "name": "Production API Key",
+ "obfuscated_value": "sk_...3456",
+ "last_used_at": null,
+ "permissions": [
+ "posts:read",
+ "posts:write"
+ ],
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "updated_at": "2026-01-15T12:00:00.000Z"
+}
diff --git a/test/WorkOSTests/testdata/api_key_validation_response_api_key_owner.json b/test/WorkOSTests/testdata/api_key_validation_response_api_key_owner.json
new file mode 100644
index 00000000..ddbfe81d
--- /dev/null
+++ b/test/WorkOSTests/testdata/api_key_validation_response_api_key_owner.json
@@ -0,0 +1,4 @@
+{
+ "type": "organization",
+ "id": "org_01EHZNVPK3SFK441A1RGBFSHRT"
+}
diff --git a/test/WorkOSTests/testdata/directory_user.json b/test/WorkOSTests/testdata/directory_user.json
index 68d037ee..54b60741 100644
--- a/test/WorkOSTests/testdata/directory_user.json
+++ b/test/WorkOSTests/testdata/directory_user.json
@@ -33,5 +33,6 @@
}
],
"created_at": "2026-01-15T12:00:00.000Z",
- "updated_at": "2026-01-15T12:00:00.000Z"
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "name": "Marcelina Davis"
}
diff --git a/test/WorkOSTests/testdata/directory_user_nulls.json b/test/WorkOSTests/testdata/directory_user_nulls.json
index bf44149b..96608cca 100644
--- a/test/WorkOSTests/testdata/directory_user_nulls.json
+++ b/test/WorkOSTests/testdata/directory_user_nulls.json
@@ -21,5 +21,6 @@
"role": null,
"roles": null,
"created_at": "2026-01-15T12:00:00.000Z",
- "updated_at": "2026-01-15T12:00:00.000Z"
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "name": null
}
diff --git a/test/WorkOSTests/testdata/directory_user_with_groups.json b/test/WorkOSTests/testdata/directory_user_with_groups.json
index d7d35220..d48e0900 100644
--- a/test/WorkOSTests/testdata/directory_user_with_groups.json
+++ b/test/WorkOSTests/testdata/directory_user_with_groups.json
@@ -48,5 +48,6 @@
"created_at": "2026-01-15T12:00:00.000Z",
"updated_at": "2026-01-15T12:00:00.000Z"
}
- ]
+ ],
+ "name": "Marcelina Davis"
}
diff --git a/test/WorkOSTests/testdata/directory_user_with_groups_nulls.json b/test/WorkOSTests/testdata/directory_user_with_groups_nulls.json
index a2d21882..c3121fee 100644
--- a/test/WorkOSTests/testdata/directory_user_with_groups_nulls.json
+++ b/test/WorkOSTests/testdata/directory_user_with_groups_nulls.json
@@ -36,5 +36,6 @@
"created_at": "2026-01-15T12:00:00.000Z",
"updated_at": "2026-01-15T12:00:00.000Z"
}
- ]
+ ],
+ "name": null
}
diff --git a/test/WorkOSTests/testdata/dsync_group_user_added.json b/test/WorkOSTests/testdata/dsync_group_user_added.json
index 61c5aac6..5405b4c7 100644
--- a/test/WorkOSTests/testdata/dsync_group_user_added.json
+++ b/test/WorkOSTests/testdata/dsync_group_user_added.json
@@ -38,7 +38,8 @@
}
],
"created_at": "2026-01-15T12:00:00.000Z",
- "updated_at": "2026-01-15T12:00:00.000Z"
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "name": "Marcelina Davis"
},
"group": {
"object": "directory_group",
diff --git a/test/WorkOSTests/testdata/dsync_group_user_added_data.json b/test/WorkOSTests/testdata/dsync_group_user_added_data.json
index 5ef37883..8895262e 100644
--- a/test/WorkOSTests/testdata/dsync_group_user_added_data.json
+++ b/test/WorkOSTests/testdata/dsync_group_user_added_data.json
@@ -35,7 +35,8 @@
}
],
"created_at": "2026-01-15T12:00:00.000Z",
- "updated_at": "2026-01-15T12:00:00.000Z"
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "name": "Marcelina Davis"
},
"group": {
"object": "directory_group",
diff --git a/test/WorkOSTests/testdata/dsync_group_user_added_nulls.json b/test/WorkOSTests/testdata/dsync_group_user_added_nulls.json
index 8020578c..320a2c42 100644
--- a/test/WorkOSTests/testdata/dsync_group_user_added_nulls.json
+++ b/test/WorkOSTests/testdata/dsync_group_user_added_nulls.json
@@ -38,7 +38,8 @@
}
],
"created_at": "2026-01-15T12:00:00.000Z",
- "updated_at": "2026-01-15T12:00:00.000Z"
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "name": "Marcelina Davis"
},
"group": {
"object": "directory_group",
diff --git a/test/WorkOSTests/testdata/dsync_group_user_removed.json b/test/WorkOSTests/testdata/dsync_group_user_removed.json
index 3b991f47..cc50e53a 100644
--- a/test/WorkOSTests/testdata/dsync_group_user_removed.json
+++ b/test/WorkOSTests/testdata/dsync_group_user_removed.json
@@ -38,7 +38,8 @@
}
],
"created_at": "2026-01-15T12:00:00.000Z",
- "updated_at": "2026-01-15T12:00:00.000Z"
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "name": "Marcelina Davis"
},
"group": {
"object": "directory_group",
diff --git a/test/WorkOSTests/testdata/dsync_group_user_removed_data.json b/test/WorkOSTests/testdata/dsync_group_user_removed_data.json
index 5ef37883..8895262e 100644
--- a/test/WorkOSTests/testdata/dsync_group_user_removed_data.json
+++ b/test/WorkOSTests/testdata/dsync_group_user_removed_data.json
@@ -35,7 +35,8 @@
}
],
"created_at": "2026-01-15T12:00:00.000Z",
- "updated_at": "2026-01-15T12:00:00.000Z"
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "name": "Marcelina Davis"
},
"group": {
"object": "directory_group",
diff --git a/test/WorkOSTests/testdata/dsync_group_user_removed_nulls.json b/test/WorkOSTests/testdata/dsync_group_user_removed_nulls.json
index 0f84b661..dcc2f3eb 100644
--- a/test/WorkOSTests/testdata/dsync_group_user_removed_nulls.json
+++ b/test/WorkOSTests/testdata/dsync_group_user_removed_nulls.json
@@ -38,7 +38,8 @@
}
],
"created_at": "2026-01-15T12:00:00.000Z",
- "updated_at": "2026-01-15T12:00:00.000Z"
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "name": "Marcelina Davis"
},
"group": {
"object": "directory_group",
diff --git a/test/WorkOSTests/testdata/dsync_token_created.json b/test/WorkOSTests/testdata/dsync_token_created.json
new file mode 100644
index 00000000..9cbd9472
--- /dev/null
+++ b/test/WorkOSTests/testdata/dsync_token_created.json
@@ -0,0 +1,35 @@
+{
+ "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
+ "event": "dsync.token.created",
+ "data": {
+ "object": "directory_token",
+ "id": "directory_token_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "directory_id": "directory_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "token_suffix": "a1b2",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "expires_at": null
+ },
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "context": {
+ "google_analytics_client_id": "GA1.2.1234567890.1234567890",
+ "google_analytics_sessions": [
+ {
+ "containerId": "GTM-ABCDEF",
+ "sessionId": "1234567890",
+ "sessionNumber": "1"
+ }
+ ],
+ "ajs_anonymous_id": "ajs_anon_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "client_id": "client_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "actor": {
+ "id": "user_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "source": "api",
+ "name": "Jane Doe"
+ },
+ "previous_attributes": {
+ "key": {}
+ }
+ },
+ "object": "event"
+}
diff --git a/test/WorkOSTests/testdata/dsync_token_created_data.json b/test/WorkOSTests/testdata/dsync_token_created_data.json
new file mode 100644
index 00000000..7dd1d132
--- /dev/null
+++ b/test/WorkOSTests/testdata/dsync_token_created_data.json
@@ -0,0 +1,9 @@
+{
+ "object": "directory_token",
+ "id": "directory_token_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "directory_id": "directory_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "token_suffix": "a1b2",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "expires_at": null
+}
diff --git a/test/WorkOSTests/testdata/dsync_token_created_data_nulls.json b/test/WorkOSTests/testdata/dsync_token_created_data_nulls.json
new file mode 100644
index 00000000..430d521a
--- /dev/null
+++ b/test/WorkOSTests/testdata/dsync_token_created_data_nulls.json
@@ -0,0 +1,9 @@
+{
+ "object": "directory_token",
+ "id": "directory_token_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "directory_id": "directory_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "organization_id": null,
+ "token_suffix": "a1b2",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "expires_at": null
+}
diff --git a/test/WorkOSTests/testdata/dsync_token_created_nulls.json b/test/WorkOSTests/testdata/dsync_token_created_nulls.json
new file mode 100644
index 00000000..94bee34c
--- /dev/null
+++ b/test/WorkOSTests/testdata/dsync_token_created_nulls.json
@@ -0,0 +1,16 @@
+{
+ "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
+ "event": "dsync.token.created",
+ "data": {
+ "object": "directory_token",
+ "id": "directory_token_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "directory_id": "directory_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "token_suffix": "a1b2",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "expires_at": null
+ },
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "context": null,
+ "object": "event"
+}
diff --git a/test/WorkOSTests/testdata/dsync_token_deleted.json b/test/WorkOSTests/testdata/dsync_token_deleted.json
new file mode 100644
index 00000000..3b87ac6b
--- /dev/null
+++ b/test/WorkOSTests/testdata/dsync_token_deleted.json
@@ -0,0 +1,35 @@
+{
+ "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
+ "event": "dsync.token.deleted",
+ "data": {
+ "object": "directory_token",
+ "id": "directory_token_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "directory_id": "directory_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "token_suffix": "a1b2",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "expires_at": null
+ },
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "context": {
+ "google_analytics_client_id": "GA1.2.1234567890.1234567890",
+ "google_analytics_sessions": [
+ {
+ "containerId": "GTM-ABCDEF",
+ "sessionId": "1234567890",
+ "sessionNumber": "1"
+ }
+ ],
+ "ajs_anonymous_id": "ajs_anon_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "client_id": "client_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "actor": {
+ "id": "user_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "source": "api",
+ "name": "Jane Doe"
+ },
+ "previous_attributes": {
+ "key": {}
+ }
+ },
+ "object": "event"
+}
diff --git a/test/WorkOSTests/testdata/dsync_token_deleted_data.json b/test/WorkOSTests/testdata/dsync_token_deleted_data.json
new file mode 100644
index 00000000..7dd1d132
--- /dev/null
+++ b/test/WorkOSTests/testdata/dsync_token_deleted_data.json
@@ -0,0 +1,9 @@
+{
+ "object": "directory_token",
+ "id": "directory_token_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "directory_id": "directory_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "token_suffix": "a1b2",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "expires_at": null
+}
diff --git a/test/WorkOSTests/testdata/dsync_token_deleted_data_nulls.json b/test/WorkOSTests/testdata/dsync_token_deleted_data_nulls.json
new file mode 100644
index 00000000..430d521a
--- /dev/null
+++ b/test/WorkOSTests/testdata/dsync_token_deleted_data_nulls.json
@@ -0,0 +1,9 @@
+{
+ "object": "directory_token",
+ "id": "directory_token_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "directory_id": "directory_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "organization_id": null,
+ "token_suffix": "a1b2",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "expires_at": null
+}
diff --git a/test/WorkOSTests/testdata/dsync_token_deleted_nulls.json b/test/WorkOSTests/testdata/dsync_token_deleted_nulls.json
new file mode 100644
index 00000000..bdfcd609
--- /dev/null
+++ b/test/WorkOSTests/testdata/dsync_token_deleted_nulls.json
@@ -0,0 +1,16 @@
+{
+ "id": "event_01EHZNVPK3SFK441A1RGBFSHRT",
+ "event": "dsync.token.deleted",
+ "data": {
+ "object": "directory_token",
+ "id": "directory_token_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "directory_id": "directory_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "organization_id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY",
+ "token_suffix": "a1b2",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "expires_at": null
+ },
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "context": null,
+ "object": "event"
+}
diff --git a/test/WorkOSTests/testdata/dsync_user_created.json b/test/WorkOSTests/testdata/dsync_user_created.json
index aa1bbc76..8ca23073 100644
--- a/test/WorkOSTests/testdata/dsync_user_created.json
+++ b/test/WorkOSTests/testdata/dsync_user_created.json
@@ -36,7 +36,8 @@
}
],
"created_at": "2026-01-15T12:00:00.000Z",
- "updated_at": "2026-01-15T12:00:00.000Z"
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "name": "Marcelina Davis"
},
"created_at": "2026-01-15T12:00:00.000Z",
"context": {
diff --git a/test/WorkOSTests/testdata/dsync_user_created_nulls.json b/test/WorkOSTests/testdata/dsync_user_created_nulls.json
index 02590c34..4891984d 100644
--- a/test/WorkOSTests/testdata/dsync_user_created_nulls.json
+++ b/test/WorkOSTests/testdata/dsync_user_created_nulls.json
@@ -36,7 +36,8 @@
}
],
"created_at": "2026-01-15T12:00:00.000Z",
- "updated_at": "2026-01-15T12:00:00.000Z"
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "name": "Marcelina Davis"
},
"created_at": "2026-01-15T12:00:00.000Z",
"context": null,
diff --git a/test/WorkOSTests/testdata/dsync_user_deleted.json b/test/WorkOSTests/testdata/dsync_user_deleted.json
index 26942d25..f702ef3a 100644
--- a/test/WorkOSTests/testdata/dsync_user_deleted.json
+++ b/test/WorkOSTests/testdata/dsync_user_deleted.json
@@ -36,7 +36,8 @@
}
],
"created_at": "2026-01-15T12:00:00.000Z",
- "updated_at": "2026-01-15T12:00:00.000Z"
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "name": "Marcelina Davis"
},
"created_at": "2026-01-15T12:00:00.000Z",
"context": {
diff --git a/test/WorkOSTests/testdata/dsync_user_deleted_nulls.json b/test/WorkOSTests/testdata/dsync_user_deleted_nulls.json
index 02c41e05..825e81b7 100644
--- a/test/WorkOSTests/testdata/dsync_user_deleted_nulls.json
+++ b/test/WorkOSTests/testdata/dsync_user_deleted_nulls.json
@@ -36,7 +36,8 @@
}
],
"created_at": "2026-01-15T12:00:00.000Z",
- "updated_at": "2026-01-15T12:00:00.000Z"
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "name": "Marcelina Davis"
},
"created_at": "2026-01-15T12:00:00.000Z",
"context": null,
diff --git a/test/WorkOSTests/testdata/dsync_user_updated.json b/test/WorkOSTests/testdata/dsync_user_updated.json
index 6c0266bf..27eb02f1 100644
--- a/test/WorkOSTests/testdata/dsync_user_updated.json
+++ b/test/WorkOSTests/testdata/dsync_user_updated.json
@@ -39,7 +39,8 @@
"updated_at": "2026-01-15T12:00:00.000Z",
"previous_attributes": {
"key": {}
- }
+ },
+ "name": "Marcelina Davis"
},
"created_at": "2026-01-15T12:00:00.000Z",
"context": {
diff --git a/test/WorkOSTests/testdata/dsync_user_updated_data.json b/test/WorkOSTests/testdata/dsync_user_updated_data.json
index 0073a535..79662824 100644
--- a/test/WorkOSTests/testdata/dsync_user_updated_data.json
+++ b/test/WorkOSTests/testdata/dsync_user_updated_data.json
@@ -36,5 +36,6 @@
"updated_at": "2026-01-15T12:00:00.000Z",
"previous_attributes": {
"key": {}
- }
+ },
+ "name": "Marcelina Davis"
}
diff --git a/test/WorkOSTests/testdata/dsync_user_updated_data_nulls.json b/test/WorkOSTests/testdata/dsync_user_updated_data_nulls.json
index 80a1887b..ca7ef651 100644
--- a/test/WorkOSTests/testdata/dsync_user_updated_data_nulls.json
+++ b/test/WorkOSTests/testdata/dsync_user_updated_data_nulls.json
@@ -22,5 +22,6 @@
"roles": null,
"created_at": "2026-01-15T12:00:00.000Z",
"updated_at": "2026-01-15T12:00:00.000Z",
- "previous_attributes": null
+ "previous_attributes": null,
+ "name": null
}
diff --git a/test/WorkOSTests/testdata/dsync_user_updated_nulls.json b/test/WorkOSTests/testdata/dsync_user_updated_nulls.json
index 15ecc37e..a11f8022 100644
--- a/test/WorkOSTests/testdata/dsync_user_updated_nulls.json
+++ b/test/WorkOSTests/testdata/dsync_user_updated_nulls.json
@@ -39,7 +39,8 @@
"updated_at": "2026-01-15T12:00:00.000Z",
"previous_attributes": {
"key": {}
- }
+ },
+ "name": "Marcelina Davis"
},
"created_at": "2026-01-15T12:00:00.000Z",
"context": null,
diff --git a/test/WorkOSTests/testdata/jwt_template_response.json b/test/WorkOSTests/testdata/jwt_template_response.json
index b691ce73..00ce7dab 100644
--- a/test/WorkOSTests/testdata/jwt_template_response.json
+++ b/test/WorkOSTests/testdata/jwt_template_response.json
@@ -1,6 +1,6 @@
{
"object": "jwt_template",
- "content": "{\"iss\": \"{{environment.id}}\", \"sub\": \"{{user.id}}\"}",
+ "content": "{\"urn:myapp:full_name\": \"{{user.first_name}} {{user.last_name}}\", \"urn:myapp:email\": \"{{user.email}}\"}",
"created_at": "2026-01-15T12:00:00.000Z",
"updated_at": "2026-01-15T12:00:00.000Z"
}
diff --git a/test/WorkOSTests/testdata/list_directory_user_with_groups.json b/test/WorkOSTests/testdata/list_directory_user_with_groups.json
index 58432bad..dbb44d56 100644
--- a/test/WorkOSTests/testdata/list_directory_user_with_groups.json
+++ b/test/WorkOSTests/testdata/list_directory_user_with_groups.json
@@ -9,6 +9,7 @@
"email": "marcelina.davis@example.com",
"first_name": "Marcelina",
"last_name": "Davis",
+ "name": "Marcelina Davis",
"emails": [
{
"primary": true,
diff --git a/test/WorkOSTests/testdata/list_empty_user_organization_membership_base_with_user.json b/test/WorkOSTests/testdata/list_empty_user_organization_membership_base_with_user.json
new file mode 100644
index 00000000..b11391a0
--- /dev/null
+++ b/test/WorkOSTests/testdata/list_empty_user_organization_membership_base_with_user.json
@@ -0,0 +1,7 @@
+{
+ "data": [],
+ "list_metadata": {
+ "before": null,
+ "after": null
+ }
+}
diff --git a/test/WorkOSTests/testdata/list_user_organization_membership.json b/test/WorkOSTests/testdata/list_user_organization_membership.json
index cdb823aa..b0764c60 100644
--- a/test/WorkOSTests/testdata/list_user_organization_membership.json
+++ b/test/WorkOSTests/testdata/list_user_organization_membership.json
@@ -3,7 +3,7 @@
{
"object": "organization_membership",
"id": "om_01HXYZ123456789ABCDEFGHIJ",
- "user_id": "user_01EHQTV6MWP9P1F4ZXGXMC8ABB",
+ "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5",
"organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
"status": "active",
"directory_managed": false,
@@ -17,6 +17,23 @@
"updated_at": "2026-01-15T12:00:00.000Z",
"role": {
"slug": "admin"
+ },
+ "user": {
+ "object": "user",
+ "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
+ "first_name": "Marcelina",
+ "last_name": "Davis",
+ "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
+ "email": "marcelina.davis@example.com",
+ "email_verified": true,
+ "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
+ "metadata": {
+ "timezone": "America/New_York"
+ },
+ "last_sign_in_at": "2025-06-25T19:07:33.155Z",
+ "locale": "en-US",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "updated_at": "2026-01-15T12:00:00.000Z"
}
}
],
diff --git a/test/WorkOSTests/testdata/list_user_organization_membership_base_list_data.json b/test/WorkOSTests/testdata/list_user_organization_membership_base_list_data.json
index b992a1b9..25ff95c0 100644
--- a/test/WorkOSTests/testdata/list_user_organization_membership_base_list_data.json
+++ b/test/WorkOSTests/testdata/list_user_organization_membership_base_list_data.json
@@ -3,7 +3,7 @@
{
"object": "organization_membership",
"id": "om_01HXYZ123456789ABCDEFGHIJ",
- "user_id": "user_01EHQTV6MWP9P1F4ZXGXMC8ABB",
+ "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5",
"organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
"status": "active",
"directory_managed": false,
diff --git a/test/WorkOSTests/testdata/list_user_organization_membership_base_with_user.json b/test/WorkOSTests/testdata/list_user_organization_membership_base_with_user.json
new file mode 100644
index 00000000..f6dc992a
--- /dev/null
+++ b/test/WorkOSTests/testdata/list_user_organization_membership_base_with_user.json
@@ -0,0 +1,41 @@
+{
+ "data": [
+ {
+ "object": "organization_membership",
+ "id": "om_01HXYZ123456789ABCDEFGHIJ",
+ "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5",
+ "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
+ "status": "active",
+ "directory_managed": false,
+ "organization_name": "Acme Corp",
+ "custom_attributes": {
+ "department": "Engineering",
+ "title": "Developer Experience Engineer",
+ "location": "Brooklyn"
+ },
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "user": {
+ "object": "user",
+ "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
+ "first_name": "Marcelina",
+ "last_name": "Davis",
+ "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
+ "email": "marcelina.davis@example.com",
+ "email_verified": true,
+ "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
+ "metadata": {
+ "timezone": "America/New_York"
+ },
+ "last_sign_in_at": "2025-06-25T19:07:33.155Z",
+ "locale": "en-US",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "updated_at": "2026-01-15T12:00:00.000Z"
+ }
+ }
+ ],
+ "list_metadata": {
+ "before": null,
+ "after": null
+ }
+}
diff --git a/test/WorkOSTests/testdata/organization_membership.json b/test/WorkOSTests/testdata/organization_membership.json
index afc05d1e..efba3046 100644
--- a/test/WorkOSTests/testdata/organization_membership.json
+++ b/test/WorkOSTests/testdata/organization_membership.json
@@ -15,5 +15,22 @@
"updated_at": "2026-01-15T12:00:00.000Z",
"role": {
"slug": "admin"
+ },
+ "user": {
+ "object": "user",
+ "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
+ "first_name": "Marcelina",
+ "last_name": "Davis",
+ "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
+ "email": "marcelina.davis@example.com",
+ "email_verified": true,
+ "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
+ "metadata": {
+ "timezone": "America/New_York"
+ },
+ "last_sign_in_at": "2025-06-25T19:07:33.155Z",
+ "locale": "en-US",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "updated_at": "2026-01-15T12:00:00.000Z"
}
}
diff --git a/test/WorkOSTests/testdata/organization_membership_nulls.json b/test/WorkOSTests/testdata/organization_membership_nulls.json
index de12198d..bd5e0aa1 100644
--- a/test/WorkOSTests/testdata/organization_membership_nulls.json
+++ b/test/WorkOSTests/testdata/organization_membership_nulls.json
@@ -11,5 +11,22 @@
"updated_at": "2026-01-15T12:00:00.000Z",
"role": {
"slug": "admin"
+ },
+ "user": {
+ "object": "user",
+ "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
+ "first_name": "Marcelina",
+ "last_name": "Davis",
+ "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
+ "email": "marcelina.davis@example.com",
+ "email_verified": true,
+ "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
+ "metadata": {
+ "timezone": "America/New_York"
+ },
+ "last_sign_in_at": "2025-06-25T19:07:33.155Z",
+ "locale": "en-US",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "updated_at": "2026-01-15T12:00:00.000Z"
}
}
diff --git a/test/WorkOSTests/testdata/profile.json b/test/WorkOSTests/testdata/profile.json
index 485a13ce..2efd7924 100644
--- a/test/WorkOSTests/testdata/profile.json
+++ b/test/WorkOSTests/testdata/profile.json
@@ -25,5 +25,6 @@
},
"raw_attributes": {
"key": {}
- }
+ },
+ "name": "Todd Rundgren"
}
diff --git a/test/WorkOSTests/testdata/profile_nulls.json b/test/WorkOSTests/testdata/profile_nulls.json
index 8b2e640e..c4834851 100644
--- a/test/WorkOSTests/testdata/profile_nulls.json
+++ b/test/WorkOSTests/testdata/profile_nulls.json
@@ -14,5 +14,6 @@
"custom_attributes": null,
"raw_attributes": {
"key": {}
- }
+ },
+ "name": null
}
diff --git a/test/WorkOSTests/testdata/sso_token_response.json b/test/WorkOSTests/testdata/sso_token_response.json
index 757c3fb1..7d3b7695 100644
--- a/test/WorkOSTests/testdata/sso_token_response.json
+++ b/test/WorkOSTests/testdata/sso_token_response.json
@@ -29,7 +29,8 @@
},
"raw_attributes": {
"key": {}
- }
+ },
+ "name": "Todd Rundgren"
},
"oauth_tokens": {
"provider": "GoogleOAuth",
diff --git a/test/WorkOSTests/testdata/sso_token_response_nulls.json b/test/WorkOSTests/testdata/sso_token_response_nulls.json
index 3f105c0d..117d8ab5 100644
--- a/test/WorkOSTests/testdata/sso_token_response_nulls.json
+++ b/test/WorkOSTests/testdata/sso_token_response_nulls.json
@@ -29,7 +29,8 @@
},
"raw_attributes": {
"key": {}
- }
+ },
+ "name": "Todd Rundgren"
},
"oauth_tokens": null
}
diff --git a/test/WorkOSTests/testdata/update_jwt_template.json b/test/WorkOSTests/testdata/update_jwt_template.json
index bb613667..160996e7 100644
--- a/test/WorkOSTests/testdata/update_jwt_template.json
+++ b/test/WorkOSTests/testdata/update_jwt_template.json
@@ -1,3 +1,3 @@
{
- "content": "{\"iss\": \"{{environment.id}}\", \"sub\": \"{{user.id}}\"}"
+ "content": "{\"urn:myapp:full_name\": \"{{user.first_name}} {{user.last_name}}\", \"urn:myapp:email\": \"{{user.email}}\"}"
}
diff --git a/test/WorkOSTests/testdata/user_organization_membership.json b/test/WorkOSTests/testdata/user_organization_membership.json
index d6acfbe6..184279d9 100644
--- a/test/WorkOSTests/testdata/user_organization_membership.json
+++ b/test/WorkOSTests/testdata/user_organization_membership.json
@@ -1,7 +1,7 @@
{
"object": "organization_membership",
"id": "om_01HXYZ123456789ABCDEFGHIJ",
- "user_id": "user_01EHQTV6MWP9P1F4ZXGXMC8ABB",
+ "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5",
"organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
"status": "active",
"directory_managed": false,
@@ -15,5 +15,22 @@
"updated_at": "2026-01-15T12:00:00.000Z",
"role": {
"slug": "admin"
+ },
+ "user": {
+ "object": "user",
+ "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
+ "first_name": "Marcelina",
+ "last_name": "Davis",
+ "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
+ "email": "marcelina.davis@example.com",
+ "email_verified": true,
+ "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
+ "metadata": {
+ "timezone": "America/New_York"
+ },
+ "last_sign_in_at": "2025-06-25T19:07:33.155Z",
+ "locale": "en-US",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "updated_at": "2026-01-15T12:00:00.000Z"
}
}
diff --git a/test/WorkOSTests/testdata/user_organization_membership_base_list_data.json b/test/WorkOSTests/testdata/user_organization_membership_base_list_data.json
index a4e9ebde..b42fdcf6 100644
--- a/test/WorkOSTests/testdata/user_organization_membership_base_list_data.json
+++ b/test/WorkOSTests/testdata/user_organization_membership_base_list_data.json
@@ -1,7 +1,7 @@
{
"object": "organization_membership",
"id": "om_01HXYZ123456789ABCDEFGHIJ",
- "user_id": "user_01EHQTV6MWP9P1F4ZXGXMC8ABB",
+ "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5",
"organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
"status": "active",
"directory_managed": false,
diff --git a/test/WorkOSTests/testdata/user_organization_membership_base_list_data_nulls.json b/test/WorkOSTests/testdata/user_organization_membership_base_list_data_nulls.json
index 65d22a40..e5a5c38d 100644
--- a/test/WorkOSTests/testdata/user_organization_membership_base_list_data_nulls.json
+++ b/test/WorkOSTests/testdata/user_organization_membership_base_list_data_nulls.json
@@ -1,7 +1,7 @@
{
"object": "organization_membership",
"id": "om_01HXYZ123456789ABCDEFGHIJ",
- "user_id": "user_01EHQTV6MWP9P1F4ZXGXMC8ABB",
+ "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5",
"organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
"status": "active",
"directory_managed": false,
diff --git a/test/WorkOSTests/testdata/user_organization_membership_base_with_user.json b/test/WorkOSTests/testdata/user_organization_membership_base_with_user.json
new file mode 100644
index 00000000..f3a20339
--- /dev/null
+++ b/test/WorkOSTests/testdata/user_organization_membership_base_with_user.json
@@ -0,0 +1,33 @@
+{
+ "object": "organization_membership",
+ "id": "om_01HXYZ123456789ABCDEFGHIJ",
+ "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5",
+ "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
+ "status": "active",
+ "directory_managed": false,
+ "organization_name": "Acme Corp",
+ "custom_attributes": {
+ "department": "Engineering",
+ "title": "Developer Experience Engineer",
+ "location": "Brooklyn"
+ },
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "user": {
+ "object": "user",
+ "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
+ "first_name": "Marcelina",
+ "last_name": "Davis",
+ "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
+ "email": "marcelina.davis@example.com",
+ "email_verified": true,
+ "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
+ "metadata": {
+ "timezone": "America/New_York"
+ },
+ "last_sign_in_at": "2025-06-25T19:07:33.155Z",
+ "locale": "en-US",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "updated_at": "2026-01-15T12:00:00.000Z"
+ }
+}
diff --git a/test/WorkOSTests/testdata/user_organization_membership_base_with_user_nulls.json b/test/WorkOSTests/testdata/user_organization_membership_base_with_user_nulls.json
new file mode 100644
index 00000000..491016f9
--- /dev/null
+++ b/test/WorkOSTests/testdata/user_organization_membership_base_with_user_nulls.json
@@ -0,0 +1,29 @@
+{
+ "object": "organization_membership",
+ "id": "om_01HXYZ123456789ABCDEFGHIJ",
+ "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5",
+ "organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
+ "status": "active",
+ "directory_managed": false,
+ "organization_name": null,
+ "custom_attributes": null,
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "updated_at": "2026-01-15T12:00:00.000Z",
+ "user": {
+ "object": "user",
+ "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
+ "first_name": "Marcelina",
+ "last_name": "Davis",
+ "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
+ "email": "marcelina.davis@example.com",
+ "email_verified": true,
+ "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
+ "metadata": {
+ "timezone": "America/New_York"
+ },
+ "last_sign_in_at": "2025-06-25T19:07:33.155Z",
+ "locale": "en-US",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "updated_at": "2026-01-15T12:00:00.000Z"
+ }
+}
diff --git a/test/WorkOSTests/testdata/user_organization_membership_nulls.json b/test/WorkOSTests/testdata/user_organization_membership_nulls.json
index 53c87692..0b876e2a 100644
--- a/test/WorkOSTests/testdata/user_organization_membership_nulls.json
+++ b/test/WorkOSTests/testdata/user_organization_membership_nulls.json
@@ -1,7 +1,7 @@
{
"object": "organization_membership",
"id": "om_01HXYZ123456789ABCDEFGHIJ",
- "user_id": "user_01EHQTV6MWP9P1F4ZXGXMC8ABB",
+ "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5",
"organization_id": "org_01EHZNVPK3SFK441A1RGBFSHRT",
"status": "active",
"directory_managed": false,
@@ -11,5 +11,22 @@
"updated_at": "2026-01-15T12:00:00.000Z",
"role": {
"slug": "admin"
+ },
+ "user": {
+ "object": "user",
+ "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
+ "first_name": "Marcelina",
+ "last_name": "Davis",
+ "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
+ "email": "marcelina.davis@example.com",
+ "email_verified": true,
+ "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
+ "metadata": {
+ "timezone": "America/New_York"
+ },
+ "last_sign_in_at": "2025-06-25T19:07:33.155Z",
+ "locale": "en-US",
+ "created_at": "2026-01-15T12:00:00.000Z",
+ "updated_at": "2026-01-15T12:00:00.000Z"
}
}