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

Library can't fetch expanded properties, doesn't handle 404 errors as well. #33

Open vvolodin opened 8 years ago

vvolodin commented 8 years ago

This is ridiculous, library literally can't do anything I need from it.

I need to get 1 user's properties including his memberOf array. My code:

var currentUser = client.Users.GetByObjectId(currentUserObjectId).Expand(x => x.MemberOf).ExecuteAsync().Result;

First of all, this code makes a request like this one:

https://graph.windows.net/TENANTID/users/a7669d7c-2320-4d16-a0e8-b0b414b3a7bf()?$expand=memberOf&api-version=1.6

Notice the () at the end of the user id. This request results in 404 of course, because it's not a valid GUID. What's event worse is that the library can't handle it, task never finishes.

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.