Quantcast
Channel: Azure Active Directory forum
Viewing all articles
Browse latest Browse all 16000

Office 365 unified api Object reference not set to an instance of an object

$
0
0

I'm tring to use the new office365 unified api to query the users list and user file.
I've created the application in azure management portal, and I gave the permission to the new api application (with the directory and files read)
I've created both a client and a webapi application, to try.

In my code, I use a x509 certificate to acquire the token, and I get it without problem.
Then I call, with curl, the url "https://graph.microsoft.com/beta/salesianisesto.it/users/" (where salesianisesto.it is my tenant domain) to get the users list, and I get a 500 error:Object reference not set to an instance of an object.
I've tried with other urls, and also I've tried call that url, with the same header (the authorization: bearer, etc) directly in firefox, and I've the same problem.

I've checked if it's an authorization error, but it doesn't seam...
If I omit the authorization header, or I but a wrong one, I get a 401 error.
Here's the header I'm sending to the url:
User-Agent: php-microsoft-graph-api/1.0
Authorization: Bearer ey...
Accept: application/json
client-request-id: cbe6f962-8b7e-ee4d-a1bc-34c260cf93ec
return-client-request-id: true

I've tried the url with the graphexplorer2 app, and it work ok...
Any hint or suggestion to debug the problem?
Thanks to all



Viewing all articles
Browse latest Browse all 16000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>