/me and /users/{id} basics: who the token belongs to, and the user ids the drive functions take. App-only tokens have no /me; address users by id or user principal name instead.

Permissions. User.Read (delegated, /me); User.Read.All (application, any user; User.ReadBasic.All for basic fields).

Values

USER_SELECT

USER_SELECT: Str "id,displayName,userPrincipalName,mail,givenName,surname,jobTitle,preferredLanguage"

Functions

get-user

fn (id-or-upn: Str): Map
fn (id-or-upn: Str, opts: Map): Map

GET /users/{id | userPrincipalName}. opts takes OData options (select, expand) and credentials.

list-users

fn (): Vec
fn (opts: Map): Vec
fn (opts: Map, limit: Int?): Vec

GET /users - every user (following @odata.nextLink), or at most limit. opts takes OData options; search and count add ConsistencyLevel: eventual for you.

staff ::microsoft::graph::users/list-users({filter: "accountEnabled eq true", select: ["id", "mail"]}, 500)

me

fn (): Map
fn (opts: Map): Map

GET /me - the signed-in user (delegated tokens only). opts takes OData options (select, default the common profile fields) and credentials.

who ::microsoft::graph::users/me()
who.userPrincipalName

user-path

fn (id-or-upn: Str): Str

The Graph path for a user id or user principal name: /users/{encoded} (pure).