Method CreateAsync
- Namespace
- MailFathom.Application.Access.Organizations
- Assembly
- MailFathom.Application.dll
CreateAsync(string?, OrganizationShortName, CancellationToken)
Records an organization under an identifier this deployment mints.
public Task<OrganizationWriteResult> CreateAsync(string? displayName, OrganizationShortName shortName, CancellationToken cancellationToken)
Parameters
displayNamestringThe name an operator reads it by.
shortNameOrganizationShortNameThe short name its members will sign in under.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<OrganizationWriteResult>
What the act did, carrying the minted identifier when it was written.
Exceptions
- ArgumentException
Thrown when
displayNamebreaks FindDisplayNameRefusal(string?) orshortNameis the unspecified struct default.- PrincipalNotAuthorizedException
Thrown when the caller does not hold AdminConfigurationWrite.