Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ingest/azure_ad): support v2 (Entra ID) endpoints #11749

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wfrced
Copy link

@wfrced wfrced commented Oct 29, 2024

This allows Azure AD ingestion source to fetch data from v2 endpoints (Entra ID), instead of failing with 400 error due to resource field not being supported by v2 API.

I've decided to add an optional field endpoint_version, and send either resource or scope token field depending on its value. Could be a boolean (or be extracted from authority/token_url), but this is simpler and clearer.

Apologies in advance for linking to stackoverflow, but I couldn't find a better resource on Microsoft's side.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added ingestion PR or Issue related to the ingestion of metadata community-contribution PR or Issue raised by member(s) of DataHub Community labels Oct 29, 2024
}
if self.config.endpoint_version == "v2":
self.token_data["scope"] = "https://graph.microsoft.com/.default"
Copy link
Author

Choose a reason for hiding this comment

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

This is potentially breaking - I've excluded scope by default because it doesn't seem like it is used by v1 API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution PR or Issue raised by member(s) of DataHub Community ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant