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

I cannot get this sample to work with VS2017 #57

Open RobertBernstein opened 6 years ago

RobertBernstein commented 6 years ago

I have both cloned this repository and downloaded it as a zip file. When I open the solution in Visual Studio 2017, it tells me that all of the NuGet packages have been restored, but then I get a list of assemblies in the References folder that were not found. The only way I can get this to build is to remove and re-add some of the NuGet packages.

Once I do that, I can get the solution to build, but the sample doesn't work. I successfully log into my tenant, but even though it shows my account name in the toolbar, all of the pages relating to AAD information come up blank and it tells me that I still need to sign-in.

Any ideas how to make this sample work in VS2017?

Thanks.

Rob

isawek commented 6 years ago

I have the same problem. I debugged the code and i get the Error "Insufficient privileges to complete the operation." maybe there is something wrong with the Permissions in our Azure App?

isawek commented 6 years ago

I solved the problem in my environment. i added a few more permissions (everything that sounds like read and write user data) but nothing changed. Then i saw the "Grant Permissions" icon and after that it worked. I don´t know yet what permissions are needed but i'll try some options.

https://i.stack.imgur.com/CTrh4.png

Edit: Delegated Permissions "Access directory as the signed in user" and "Read and write directory data" are enough