Skip to content

Currently Graph api does not support custom Graph Url #2354

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

Open
raghucha opened this issue Apr 10, 2025 · 2 comments
Open

Currently Graph api does not support custom Graph Url #2354

raghucha opened this issue Apr 10, 2025 · 2 comments
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience

Comments

@raghucha
Copy link

Describe the bug

Currently in BaseGraphRequestAdapter we have support for the below list of cloud URL

cloudList.put( Clouds.GLOBAL_CLOUD, "https://graph.microsoft.com" );
   cloudList.put( Clouds.USGOV_CLOUD, "https://graph.microsoft.us");
   cloudList.put( Clouds.CHINA_CLOUD, "https://microsoftgraph.chinacloudapi.cn");
   cloudList.put( Clouds.GERMANY_CLOUD, "https://graph.microsoft.de");
   cloudList.put( Clouds.USGOV_DOD_CLOUD, "https://dod-graph.microsoft.us");

However in the GraphServiceClient there is no option to configure the URL

here is sample code


 AzureIdentityAuthenticationProvider authenticationProvider = new AzureIdentityAuthenticationProvider(
            tokenCredential, new String[0], scopes);

        GraphServiceClient graphClient = new GraphServiceClient(authenticationProvider, httpClient);

Expected behavior

I feel that GraphServiceClient should have an option available to configure the base URL from the cloudList

GraphServiceClient graphClient = new GraphServiceClient(authenticationProvider, httpClient);

How to reproduce

Try creating GraphServiceClient with custom baseURL

SDK Version

6.34.0

Latest version known to work for scenario above?

No response

Known Workarounds

No known workarounds

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_
@raghucha raghucha added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Apr 10, 2025
@raghucha
Copy link
Author

@raghucha
Copy link
Author

@andrueastman can you take a look at the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

1 participant