Update organization settings
Last updated:
The Initial MVP organization settings surface supports changing the organization name through IOrganizationApplication.UpdateOrganizationAsync.
Important
Organization retrieval and name update are implemented preview foundations. Complete policy enforcement depends on the remaining WS-005 authorization work.
Prerequisites
- Retrieve the current
OrganizationSnapshot. - Preserve its opaque
VersionTokenwithout parsing or comparing it. - Ensure the caller is authenticated and the application applies the current organization-update authorization boundary.
Submit the update
var command = new UpdateOrganizationCommand(
organization.OrganizationId,
"Contoso Projects",
organization.Version);
OperationResult<OrganizationSnapshot> result =
await organizationApplication.UpdateOrganizationAsync(
command,
cancellationToken);
Use the returned snapshot as the authoritative committed state.
Handle concurrency
A stale expected version returns concurrency_conflict. Refresh the organization, show the current value, and require the user to confirm a new update. Do not retry automatically with a newly loaded token.
Scope limitations
The operation cannot change organization identity, ownership, membership state, lifecycle state, billing state, slug, domain, or arbitrary metadata.
Verify the result
After success, verify that:
- the returned name is the accepted committed value;
- the returned version differs from the submitted expected version;
- organization identity is unchanged;
- stale and foreign identifiers produce controlled failures without disclosure.
Next steps
Review Roles and Authorization model.