lola_the_coding_girl lola_the_coding_girl - 11 months ago 155
PHP Question

403 ErrorAccessDenied in Outlook API

Using the Outlook API I am able to pull calendar events. What I'm trying to do next is, if an event has an attendee email, pull the rest of that attendee's contact data from Outlook's contacts REST API. I believe that I have the query right with

in the URL but I'm getting back the following when I do display the response from cURL:

string '{"error":{"code":"ErrorAccessDenied","message":"Access is denied. Check credentials and try again."}}' (length=101)

It seems that my credentials are good enough to get calendar events but are somehow invalid a second later trying to get contacts. What am I missing?


What permissions does your app request when it authenticates? Assuming you're using the v2 app model to authenticate this is what is passed in the scope parameter in the authorization request URL:<SOME GUID>

In order to access contacts you need to have or, depending on if you need write access.