MicrosoftGraphSourceOptions

Connection options for the Microsoft Graph source connector.

class scamander.models.source_config.microsoft_graph.MicrosoftGraphSourceOptions(*, tenant_id: str, client_id: str, client_secret: str, endpoint: str, select: list[str] | None = None, filter: str | None = None, expand: str | None = None, delta_link: str | None = None, flatten_nested: bool = False, page_size: int | None = None)

Bases: BaseModel

Connection options for the generic Microsoft Graph source connector.

Drives a single reusable connector against any Microsoft Graph v1.0 resource — Users, Groups, Enterprise Applications (service principals), directory role assignments, or any other Graph endpoint — through configuration rather than a dedicated connector class per resource type.

tenant_id

Azure AD tenant ID (GUID or verified domain) used to build the AAD v2.0 token endpoint.

Type:

str

client_id

Client ID of the app registration used for the client-credentials (app-only) OAuth 2.0 flow.

Type:

str

client_secret

Client secret of the app registration. Always resolve this from a secret store (e.g. via Platform.get_secret) — never hardcode it in a config file.

Type:

str

endpoint

Graph resource path relative to https://graph.microsoft.com/v1.0, e.g. "/users/delta", "/groups/delta", "/servicePrincipals", or "/roleManagement/directory/roleAssignments".

Type:

str

select

Field names mapped to the $select query parameter. Ignored when delta_link is set. Defaults to None (Graph’s default field set for the resource).

Type:

list[str] | None

filter

Raw OData filter expression mapped to $filter. Ignored when delta_link is set. Defaults to None.

Type:

str | None

expand

Raw OData expand expression mapped to $expand, e.g. "principal,roleDefinition". Ignored when delta_link is set. Defaults to None.

Type:

str | None

A previously returned @odata.deltaLink used to resume a delta query and fetch only what changed since the prior run. When set, endpoint/select/filter/expand are ignored — the connector issues its first request directly against this URL, since a deltaLink is a complete, self-describing request. Only meaningful against delta-capable endpoints (e.g. /users/delta, /groups/delta). Defaults to None (full sync).

Type:

str | None

flatten_nested

When True, flattens nested objects (e.g. from $expand) in every returned record into a single level before building the DataFrame. Defaults to False.

Type:

bool

page_size

Value for the $top query parameter, capping records per page. Defaults to None (Graph’s per-resource default).

Type:

int | None

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].