I'm trying to make an calendar view for my company to show which employees are available. I made an app in Azure, I can logon in to the system, I get an access token, but I can't get information.
I build the request url using curl and send this header with my request
array(6) {
[0]=>
string(28) "User-Agent: php-tutorial/1.0"
[1]=>
string(588) "Authorization: Bearer ~ACCESS_TOKEN~"
[2]=>
string(24) "Accept: application/json"
[3]=>
string(55) "client-request-id: ~GUID~"
[4]=>
string(30) "return-client-request-id: true"
[5]=>
string(45) "X-AnchorMailbox: ~MAIL~"
}
And all I get as a response is: " "
What am I doing wrong?
UPDATE
After logging in, Microsoft does not ask if i want to grant access to the app, but it does grant me an access token. Could this be the problem? And how can I make it ask for permission?
UPDATE 2
After logging in and trying to get information, I get a 401 Error saying: Access denied. Which is strange I think cause it already granted me an access token.
UPDATE 3
Couple days further and I have tried some example and tutorial code to check if it works. But even in these apps the api seem not to work. These are the projects I have tried.