Member Junction
    Preparing search index...

    Credentials for Microsoft Graph (Azure AD) email provider.

    // Use with SendSingleMessage
    await provider.SendSingleMessage(message, {
    tenantId: 'your-tenant-id',
    clientId: 'your-client-id',
    clientSecret: 'your-client-secret',
    accountEmail: 'user@domain.com'
    });

    // Override only accountEmail (use env vars for auth)
    await provider.SendSingleMessage(message, {
    accountEmail: 'different-mailbox@domain.com'
    });

    // Disable environment fallback
    await provider.SendSingleMessage(message, {
    tenantId: 'your-tenant-id',
    clientId: 'your-client-id',
    clientSecret: 'your-client-secret',
    accountEmail: 'user@domain.com',
    disableEnvironmentFallback: true
    });
    interface MSGraphCredentials {
        accountEmail?: string;
        clientId?: string;
        clientSecret?: string;
        disableEnvironmentFallback?: boolean;
        tenantId?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    accountEmail?: string

    Email address of the mailbox to send from. If not provided, falls back to AZURE_ACCOUNT_EMAIL environment variable. Can also be overridden via message.From.

    clientId?: string

    Azure AD application (client) ID (GUID). If not provided, falls back to AZURE_CLIENT_ID environment variable.

    clientSecret?: string

    Azure AD application client secret. If not provided, falls back to AZURE_CLIENT_SECRET environment variable.

    disableEnvironmentFallback?: boolean

    When true, environment variable fallback is DISABLED for this request. If credentials are incomplete and this is true, the request will fail rather than falling back to environment variables.

    false (fallback enabled for backward compatibility)
    
    // With fallback (default) - uses env var if apiKey not provided
    await provider.SendSingleMessage(message, {});

    // Without fallback - fails if apiKey not provided
    await provider.SendSingleMessage(message, {
    disableEnvironmentFallback: true
    });
    tenantId?: string

    Azure AD tenant ID (GUID). If not provided, falls back to AZURE_TENANT_ID environment variable.