basalt / drives-microsoft/src / MicrosoftDriveOptions
Interface: MicrosoftDriveOptions
Defined in: drives-microsoft/src/index.ts:199
Properties
ancestryMaxDepth?
> optional ancestryMaxDepth?: number
Defined in: drives-microsoft/src/index.ts:252
Folder levels a confinement check may walk up from an item towards a folder-scoped connection's root (item:{id}). Default 32. An item deeper than this below the root is refused rather than guessed about.
changeTypes?
> optional changeTypes?: readonly string[]
Defined in: drives-microsoft/src/index.ts:246
Change types to subscribe to. Default ['updated'], which covers create, edit and delete.
clientId
> clientId: string
Defined in: drives-microsoft/src/index.ts:201
Application (client) id from the Entra ID app registration.
clientSecret?
> optional clientSecret?: string
Defined in: drives-microsoft/src/index.ts:211
Client secret.
Optional: a public client (a SPA or a desktop app registration) uses PKCE alone. A web app registration has a secret and must send it. Unlike Dropbox, it is not also a webhook signing key — Graph does not sign notifications at all; the clientState we generate per subscription is the authentication.
downloadHosts?
> optional downloadHosts?: readonly string[]
Defined in: drives-microsoft/src/index.ts:238
Hosts a download may be redirected to. Defaults to MICROSOFT_DOWNLOAD_HOSTS.
now?
> optional now?: () => number
Defined in: drives-microsoft/src/index.ts:254
Injected clock (tests).
Returns
number
pageSize?
> optional pageSize?: number
Defined in: drives-microsoft/src/index.ts:240
$top for listings and the change feed. Clamped to 1…999. Default 200.
prompt?
> optional prompt?: string
Defined in: drives-microsoft/src/index.ts:236
prompt on the consent URL (select_account, consent, login). Omitted by default.
refreshScopes?
> optional refreshScopes?: readonly string[]
Defined in: drives-microsoft/src/index.ts:234
Scopes sent on a refresh.
Defaults to whatever the connection stored at consent time, falling back to scopes. Microsoft wants the refresh request's scope to be a subset of the original grant's; asking for more turns a routine refresh into an invalid_grant.
scopes?
> optional scopes?: readonly string[]
Defined in: drives-microsoft/src/index.ts:225
Scopes to request. Default: offline_access User.Read Files.Read.
subscriptionTtlMs?
> optional subscriptionTtlMs?: number
Defined in: drives-microsoft/src/index.ts:244
Subscription lifetime to request. Clamped to Graph's maximum (~30 days).
tenant?
> optional tenant?: string
Defined in: drives-microsoft/src/index.ts:223
Which Entra ID authority to use.
common(default) — any Microsoft account, personal or work/school.organizations— work/school accounts only.consumers— personal Microsoft accounts only.- a tenant GUID or verified domain (
contoso.onmicrosoft.com) — that one tenant, which is what a single-tenant app registration requires.
See the README for what changes when the app registration is multi-tenant.
uploadMaxBytes?
> optional uploadMaxBytes?: number
Defined in: drives-microsoft/src/index.ts:242
Hard ceiling for one upload. Default — and maximum — 4 MB.