Table of Contents

Interface IUserDirectoryService

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

Pluggable connection to an external user directory (e.g. Microsoft Entra ID). Optional — registered via AddUserDirectoryService<T>() on the platform options; when not registered, directory features (verify, directory-only listing, directory delete) are unavailable and their UI is hidden.

public interface IUserDirectoryService

Methods

DeleteUserAsync(string, CancellationToken)

Delete a user from the directory. For Entra this is a soft delete: the user is restorable by an administrator for 30 days, but is immediately signed-out-of and removed org-wide.

Task DeleteUserAsync(string directoryId, CancellationToken cancellationToken = default)

Parameters

directoryId string
cancellationToken CancellationToken

Returns

Task

GetUsersAsync(CancellationToken)

Enumerate all users in the directory, streamed page by page.

IAsyncEnumerable<DirectoryUser> GetUsersAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

IAsyncEnumerable<DirectoryUser>

VerifyUserAsync(IUser, CancellationToken)

Verify that a local user still exists (and is enabled) in the directory. Resolves by the user's stored DirectoryId when set, otherwise falls back to matching by email.

Task<DirectoryVerificationResult> VerifyUserAsync(IUser user, CancellationToken cancellationToken = default)

Parameters

user IUser
cancellationToken CancellationToken

Returns

Task<DirectoryVerificationResult>