Azure-Samples / active-directory-dotnet-graphapi-web

A .NET 4.5 MVC web app that demonstrates how to query the Azure AD Graph API using the Azure AD Graph Client Library
82 stars 68 forks source link

IUserFetcher.ExecuteAsync().Expand() not working correctly in v. 2.0.8 of the NuGet package for ADCL #25

Open astaykov opened 9 years ago

astaykov commented 9 years ago

Hi There, just reporting issue with implementation of Expand() of IUserFetcher. The following command generates wrong REST call:

User user = (User) await this.activeDirectoryClient.Users.GetByObjectId(id).Expand(m=>m.MemberOf).ExecuteAsync();

The resulted REST call is:

GET https://graph.windows.net/tenant.domain.com/users/74e038a4-a619-48d2-a64b-3c6d45f0621a()?$expand=memberOf&api-version=1.5 HTTP/1.1

(note the braces after object GUID, which should be forward slash instead)

which should be instead:

GET https://graph.windows.net/officestaykov.onmicrosoft.com/users/74e038a4-a619-48d2-a64b-3c6d45f0621a/?$expand=memberOf&api-version=1.5 HTTP/1.1

2masbaali commented 9 years ago

When I Run Admin code I see "HTTP Error 500.0 - Internal Server Error". how can I solve it?

matthewbcline commented 8 years ago

I've been able to reproduce this using GraphClient 2.1.0.

dkershaw10 commented 8 years ago

Sorry for the issue here. This is a known issue with how we generate the client library. We'll try and get this fixed in the next version of the client library.