namespace SharepointToolbox.Services;
///
/// Searches tenant users via Microsoft Graph API for the people-picker autocomplete.
///
public interface IGraphUserSearchService
{
///
/// Searches for users in the tenant whose display name or email matches the query.
/// Returns up to matches.
///
/// The Azure AD app client ID for Graph authentication.
/// Partial name or email to search for.
/// Maximum number of results to return (default 10).
/// Cancellation token.
/// List of (DisplayName, Email/UPN) tuples.
Task> SearchUsersAsync(
string clientId,
string query,
int maxResults = 10,
CancellationToken ct = default);
}
///
/// Represents a user returned by the Graph API people search.
///
public record GraphUserResult(string DisplayName, string UserPrincipalName, string? Mail);