Method RenameAsync
- Namespace
- MailFathom.Application.Access.Organizations
- Assembly
- MailFathom.Application.dll
RenameAsync(Guid, string?, CancellationToken)
Replaces the name an operator reads an organization by.
public Task<OrganizationWriteResult> RenameAsync(Guid organizationId, string? displayName, CancellationToken cancellationToken)
Parameters
organizationIdGuidThe organization.
displayNamestringThe new display name.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<OrganizationWriteResult>
What the act did.
Remarks
The display name is the one part of an organization its own administrator renames; an organization outside the caller's scope is answered as one this deployment does not hold.
Exceptions
- ArgumentException
Thrown when
displayNamebreaks FindDisplayNameRefusal(string?), ororganizationIdis empty.- PrincipalNotAuthorizedException
Thrown when the caller holds AdminConfigurationWrite at no scope.