Method CreateGroupAsync
- Namespace
- MailFathom.Application.Access.Grants
- Assembly
- MailFathom.Application.dll
CreateGroupAsync(string?, Guid?, CancellationToken)
Records a group under an identifier this deployment mints.
public Task<GrantWriteResult> CreateGroupAsync(string? name, Guid? organizationId, CancellationToken cancellationToken)
Parameters
namestringThe name an operator reads it by.
organizationIdGuid?The organization it belongs to, or null for a group of the deployment's.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<GrantWriteResult>
What the act did, carrying the minted identifier when it was written; UnknownOrganization also for an organization outside the caller's scope.
Exceptions
- ArgumentException
Thrown when
namebreaks FindNameRefusal(string?).- PrincipalNotAuthorizedException
Thrown when the caller holds AdminRolesWrite at no scope, or — for a group in no organization — not over the deployment.