Table of Contents

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

name string

The name an operator reads it by.

organizationId Guid?

The organization it belongs to, or null for a group of the deployment's.

cancellationToken CancellationToken

Cancels 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 name breaks FindNameRefusal(string?).

PrincipalNotAuthorizedException

Thrown when the caller holds AdminRolesWrite at no scope, or — for a group in no organization — not over the deployment.