c# - Missing UPN and PUID claims -


i'm trying access particular resource microsoft graph using following code:

private const string _userurl = "https://graph.microsoft.com/v1.0/me"; public static async task<userprofile> getuserprofile()     {         using (var client = new httpclient())         {             using (var req = new httprequestmessage(httpmethod.get, _userurl))             {                 var token = await gettoken(true);                 req.headers.add("authorization", string.format("bearer {0}", token));                 req.headers.tryaddwithoutvalidation("content-type", "application/json");                 using (var response = await client.sendasync(req))                 {                     var content = await response.content.readasstringasync();                      userprofile profile = jsonconvert.deserializeobject<userprofile>(content);                     return profile;                 }             }         }     } 

the gettoken returns expected authorization bearer token, when code reaches:

var content = await response.content.readasstringasync(); 

the response status code 400 , content "message" gives me "missing upn , puid claims".

given i'm new microsoft graph, don't understand means. if either i'm making mistake on logic or configuration on aad application. i've tried this solution, sadly not understand it.

i'd appreciate input , ask directions should looking @ resolved.

thanks in advance.

thanks reporting issue. api lacking support users login aad using external accounts (like microsoft account). working on addressing this, , expect update when available.

in mean time, try creating regular aad user using azure portal, , try api user.

[update-2016-2-16:fix in place. please give shot]


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -