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

Error reading string. Unexpected token: StartArray. Path 'amr', line 1, position 220. #2

Closed haleyjason closed 10 years ago

haleyjason commented 10 years ago

I am getting an exception when I try to access the Users view.

The serialized json accessToken seems to have an array at the "pwd" : ["amr"] which is breaking the call to the CallContext. Is there a fix for this?

RideMo commented 10 years ago

I am hitting the same error - I will investigate and get back to you on the fix.

haleyjason commented 10 years ago

I found a work around. Use the default constructor for CallContext and set the properties, like:

CallContext currentCallContext = new CallContext() { AccessToken = accessToken, ClientRequestId = Guid.NewGuid(), ApiVersion = graphApiVersion, GraphApiDomainName = "graph.windows.net", TenantId = tenantId };

RideMo commented 10 years ago

Please download and try this updated version. The issue has been fixed - note this new update uses the Version 1.0 of the Graph Library (previously it was the pre-view version 0.9. I updated the signature to use version 1.0 of the Graph Library, and enhanced the group membership lookup functionality. Let me know if there are any issues.

haleyjason commented 10 years ago

Is the GraphClient 1.0 fully signed? I'm currently getting the following error: Could not load file or assembly 'Microsoft.Azure.ActiveDirectory.GraphClient' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key.

RideMo commented 10 years ago

Please try again - I just uploaded the signed GraphClient 1.0 library earlier this afternoon Tuesday May 6th