Forum Discussion
EvansAboge
Microsoft
Aug 18, 2022The endpoint getStaffAvailability returning Unknown Error
We are trying to access the endpoint https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/{bookingBusiness-id}/microsoft.graph.getStaffAvailability but it returns Unknown Error as described here: microsoft.graph.getStaffAvailability returns UnknownError and has a N/A Permission · Issue #2043 · microsoftgraph/microsoft-graph-explorer-v4 (github.com)
The endpoint only supports application permissions, and we are sending the correct scopes (https://graph.microsoft.com/.default). We are still however getting Unknown Error
- nick_amisCopper ContributorI'm having the same problem and I'm using Application Permissions. Calls to other endpoints work find but the getStaffAvailability just won't play ball!
I know that Graph Explorer can't be used as it only support Delegate Permissions, so I've been using Postman instead and testing in PHP from my local development environment. Nothing works.
I just get 'Unknown Error'. This is my request (with Auth token truncated by me).
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/email address removed for privacy reasons/microsoft.graph.getStaffAvailability',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"staffIds": [
"79d094f1-8a95-45f7-96ed-ec8fa98e76a3"
],
"startDateTime": {
"dateTime": "2022-01-25T00:00:00",
"timeZone": "Pacific Standard Time"
},
"endDateTime": {
"dateTime": "2022-01-26T17:00:00",
"timeZone": "Pacific Standard Time"
}
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer eyJ0eXAiOiJKV1...',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;- EvansAboge
Microsoft
nick_amis Apologies for this experience. Let me escalate this
- nick_amisCopper ContributorThank you. Much appreciated.