msgraph-sdk-dotnet
msgraph-sdk-dotnet copied to clipboard
the Graph explorer CSharp code snippet for getting a site by host and path is wrong
Describe the bug In Graph explorer, The snippet for
https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com:/sites/marketing
is
var graphClient = new GraphServiceClient(requestAdapter);
var result = await graphClient.Sites["{site-id}"].Sites["{site-id1}"].GetAsync();
It should be
var graphClient = new GraphServiceClient(requestAdapter);
var result = await graphClient.Sites["contoso.sharepoint.com:/sites/marketing"].GetAsync();
Like in the http request
It would be nice the docs would show an example of getting a site by host and path for C# not only by site ID which in most cases is unknown while coding.
Thank you