Skip to content

Support certificate auth for Microsoft Graph filesystem - #71362

Merged
dabla merged 1 commit into
apache:mainfrom
fat-catTW:msgraphfs-certificate-auth
Aug 10, 2026
Merged

dabla merged 1 commit into
apache:mainfrom
fat-catTW:msgraphfs-certificate-auth

Conversation

@fat-catTW

Copy link
Copy Markdown
Contributor

Why

Microsoft Graph hooks and operators already support certificate-based authentication through certificate_path / certificate_data, but the Microsoft Graph filesystem only supported client-secret based authentication.

This prevented deployments that disallow client-secret authentication from using ObjectStoragePath with Microsoft Graph filesystems.

relates: #69335

Solution

Add certificate-based authentication handling to the Microsoft Graph filesystem.

When a connection or storage_options provides certificate_path or certificate_data, the filesystem now uses CertificateCredential to obtain a Microsoft Graph access token and passes it to msgraphfs.MSGDriveFS. The existing client-secret authentication path is unchanged.

The filesystem documentation and Microsoft Azure provider changelog are updated, and unit tests cover both certificate path and certificate data configuration.

Tests

uv run ruff format providers/microsoft/azure/src/airflow/providers/microsoft/azure/fs/msgraph.py providers/microsoft/azure/tests/unit/microsoft/azure/fs/test_msgraph.py
uv run ruff check --fix providers/microsoft/azure/src/airflow/providers/microsoft/azure/fs/msgraph.py providers/microsoft/azure/tests/unit/microsoft/azure/fs/test_msgraph.py
uv run --project providers/microsoft/azure pytest providers/microsoft/azure/tests/unit/microsoft/azure/fs/test_msgraph.py -xvs
git diff --check
Was generative AI tooling used to co-author this PR?
  • [X] Yes (please specify the tool below)

Generated-by: [Codex] following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@dabla dabla left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support certificate-based auth for Microsoft Graph Filesystem

2 participants