victorious-machine-19078
07/31/2025, 4:26 PMbrief-egg-61061
07/31/2025, 4:26 PMbrief-egg-61061
07/31/2025, 4:26 PMvictorious-machine-19078
07/31/2025, 4:30 PMvictorious-machine-19078
07/31/2025, 4:31 PMbrief-egg-61061
07/31/2025, 4:31 PMbrief-egg-61061
07/31/2025, 4:31 PMorganization_id
to your users (identities) in Ory, you need to set the organization_id
property when creating or updating an identity. This can be done via the Ory APIs. When creating a new identity: Include the organization_id
field in your request payload and set it to the ID of the organization you want the user to belong to. When updating an existing identity: You can update the identity's data and set or change the organization_id
field. Example (JSON payload for creating or updating an identity): json { "schema_id": "<preset://email>", "traits": { "email": "<mailto:user@example.com|user@example.com>" }, "organization_id": "your-organization-uuid" }
This approach is useful for pre-provisioning identities in an organization, ensuring that the user is associated with the correct organization before they log in for the first time [Pre-provisioning identities in an organization](https://www.ory.sh/docs/kratos/organizations#pre-provisioning-identities-in-an-organization). You can use the Ory API endpoints for creating or updating identities to set this field.victorious-machine-19078
07/31/2025, 4:35 PMbrief-egg-61061
07/31/2025, 4:35 PMbrief-egg-61061
07/31/2025, 4:35 PMorganization_id
field for your users (identities) without requiring SSO. The documentation states that after creating an organization, you can pre-provision identities in it by setting the organization_id
property, either when creating the identity or by updating the identity's data using the Ory APIs. This is described as useful for creating related data in your system before the user logs in for the first time, and there is no requirement that SSO be enabled for this functionality [Pre-provisioning identities in an organization](https://www.ory.sh/docs/kratos/organizations#pre-provisioning-identities-in-an-organization). So, the organization_id
field can be used independently of SSO features.