Skip to content

upd for cross-cloud calls and unification of OIDC endpoints/calls#771

Merged
paullizer merged 1 commit intoDevelopmentfrom
bugfix/graphCallsCrossCloudAuth
Mar 5, 2026
Merged

upd for cross-cloud calls and unification of OIDC endpoints/calls#771
paullizer merged 1 commit intoDevelopmentfrom
bugfix/graphCallsCrossCloudAuth

Conversation

@Bionic711
Copy link
Collaborator

Unifies authority derived for authentication and graph calls. Allows for custom authentication while remaining in one of the major clouds (MAC/MAG) enabling easier cross-cloud authentication scenarios to be supported.

Copilot AI review requested due to automatic review settings March 5, 2026 13:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR unifies the resolution of Microsoft Graph endpoints and OIDC authority URLs to better support cross-cloud authentication scenarios. It consolidates previously scattered, environment-specific hardcoded Graph URL logic into centralized helper functions, and introduces new optional env-var overrides (CUSTOM_GRAPH_AUTHORITY_URL_VALUE, CUSTOM_OIDC_METADATA_URL_VALUE) that can be applied independently of the base AZURE_ENVIRONMENT setting.

Changes:

  • Adds get_graph_endpoint(), get_graph_base_url(), and get_graph_authority() helper functions in functions_authentication.py to centralize Graph URL resolution, and replaces all previously scattered hardcoded/environment-branched Graph URL construction in route files.
  • Adds CUSTOM_GRAPH_AUTHORITY_URL_VALUE and CUSTOM_OIDC_METADATA_URL_VALUE to config.py and extends the AUTHORITY/authority setup block to enable cross-cloud override scenarios.
  • Updates example.env to document the new optional Graph override variables, and bumps VERSION to 0.239.004.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
application/single_app/functions_authentication.py Adds _normalize_authority, get_graph_authority, get_graph_base_url, and get_graph_endpoint helper functions; updates _build_msal_app to accept an authority override; updates get_valid_access_token and get_valid_access_token_for_plugins to use the new Graph authority; refactors get_user_profile_image to use get_graph_endpoint.
application/single_app/config.py Adds CUSTOM_GRAPH_AUTHORITY_URL_VALUE and CUSTOM_OIDC_METADATA_URL_VALUE env vars; restructures AUTHORITY/authority resolution to handle custom overrides; re-orders WORD_CHUNK_SIZE placement; bumps version.
application/single_app/route_backend_users.py Replaces environment-branched Graph URL construction with get_graph_endpoint("/users").
application/single_app/route_backend_public_workspaces.py Replaces environment-branched Graph URL construction with get_graph_endpoint(f"/users/{user_id}").
application/single_app/route_backend_documents.py Replaces hardcoded public-cloud Graph URL with get_graph_endpoint(f"/users/{oid}").
application/single_app/example.env Documents the two new optional Graph override env vars.

You can also share your feedback on Copilot code review. Take the survey.

@paullizer paullizer self-requested a review March 5, 2026 15:43
@paullizer paullizer merged commit dcde439 into Development Mar 5, 2026
7 of 8 checks passed
@paullizer paullizer deleted the bugfix/graphCallsCrossCloudAuth branch March 5, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants