APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
POST /solutions/bookingbusinesses/{id}/getStaffAvailability
Request header
Name
Description
Authorization
Bearer {code}. Required.
Content-Type
application/json. Required.
Request body
In the request body, pass the list of staff IDs along with two other parameters of dateTimeTimeZone resource type called startDateTime and endDateTime. These correspond to the two timestamps between which the staff availability will be returned.
Response
If successful, this method returns a 200 OK response code and a staffAvailabilityItem collection in the response body.
POST https://graph.microsoft.com/beta/solutions/bookingbusinesses/contosolunchdelivery@contoso.com/getStaffAvailability
Content-Type: application/json
{
"staffIds": [
"311a5454-08b2-4560-ba1c-f715e938cb79"
],
"startDateTime": {
"dateTime": "2022-01-25T00:00:00",
"timeZone": "India Standard Time"
},
"endDateTime": {
"dateTime": "2022-01-26T17:00:00",
"timeZone": "Pacific Standard Time"
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Solutions.BookingBusinesses.Item.GetStaffAvailability;
using Microsoft.Graph.Beta.Models;
var requestBody = new GetStaffAvailabilityPostRequestBody
{
StaffIds = new List<string>
{
"311a5454-08b2-4560-ba1c-f715e938cb79",
},
StartDateTime = new DateTimeTimeZone
{
DateTime = "2022-01-25T00:00:00",
TimeZone = "India Standard Time",
},
EndDateTime = new DateTimeTimeZone
{
DateTime = "2022-01-26T17:00:00",
TimeZone = "Pacific Standard Time",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.BookingBusinesses["{bookingBusiness-id}"].GetStaffAvailability.PostAsGetStaffAvailabilityPostResponseAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphsolutions "github.com/microsoftgraph/msgraph-beta-sdk-go/solutions"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphsolutions.NewGetStaffAvailabilityPostRequestBody()
staffIds := []string {
"311a5454-08b2-4560-ba1c-f715e938cb79",
}
requestBody.SetStaffIds(staffIds)
startDateTime := graphmodels.NewDateTimeTimeZone()
dateTime := "2022-01-25T00:00:00"
startDateTime.SetDateTime(&dateTime)
timeZone := "India Standard Time"
startDateTime.SetTimeZone(&timeZone)
requestBody.SetStartDateTime(startDateTime)
endDateTime := graphmodels.NewDateTimeTimeZone()
dateTime := "2022-01-26T17:00:00"
endDateTime.SetDateTime(&dateTime)
timeZone := "Pacific Standard Time"
endDateTime.SetTimeZone(&timeZone)
requestBody.SetEndDateTime(endDateTime)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
getStaffAvailability, err := graphClient.Solutions().BookingBusinesses().ByBookingBusinessId("bookingBusiness-id").GetStaffAvailability().PostAsGetStaffAvailabilityPostResponse(context.Background(), requestBody, nil)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.solutions.bookingbusinesses.item.getstaffavailability.GetStaffAvailabilityPostRequestBody getStaffAvailabilityPostRequestBody = new com.microsoft.graph.beta.solutions.bookingbusinesses.item.getstaffavailability.GetStaffAvailabilityPostRequestBody();
LinkedList<String> staffIds = new LinkedList<String>();
staffIds.add("311a5454-08b2-4560-ba1c-f715e938cb79");
getStaffAvailabilityPostRequestBody.setStaffIds(staffIds);
DateTimeTimeZone startDateTime = new DateTimeTimeZone();
startDateTime.setDateTime("2022-01-25T00:00:00");
startDateTime.setTimeZone("India Standard Time");
getStaffAvailabilityPostRequestBody.setStartDateTime(startDateTime);
DateTimeTimeZone endDateTime = new DateTimeTimeZone();
endDateTime.setDateTime("2022-01-26T17:00:00");
endDateTime.setTimeZone("Pacific Standard Time");
getStaffAvailabilityPostRequestBody.setEndDateTime(endDateTime);
var result = graphClient.solutions().bookingBusinesses().byBookingBusinessId("{bookingBusiness-id}").getStaffAvailability().post(getStaffAvailabilityPostRequestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Solutions\BookingBusinesses\Item\GetStaffAvailability\GetStaffAvailabilityPostRequestBody;
use Microsoft\Graph\Beta\Generated\Models\DateTimeTimeZone;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new GetStaffAvailabilityPostRequestBody();
$requestBody->setStaffIds(['311a5454-08b2-4560-ba1c-f715e938cb79', ]);
$startDateTime = new DateTimeTimeZone();
$startDateTime->setDateTime('2022-01-25T00:00:00');
$startDateTime->setTimeZone('India Standard Time');
$requestBody->setStartDateTime($startDateTime);
$endDateTime = new DateTimeTimeZone();
$endDateTime->setDateTime('2022-01-26T17:00:00');
$endDateTime->setTimeZone('Pacific Standard Time');
$requestBody->setEndDateTime($endDateTime);
$result = $graphServiceClient->solutions()->bookingBusinesses()->byBookingBusinessId('bookingBusiness-id')->getStaffAvailability()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.solutions.bookingbusinesses.item.get_staff_availability.get_staff_availability_post_request_body import GetStaffAvailabilityPostRequestBody
from msgraph_beta.generated.models.date_time_time_zone import DateTimeTimeZone
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = GetStaffAvailabilityPostRequestBody(
staff_ids = [
"311a5454-08b2-4560-ba1c-f715e938cb79",
],
start_date_time = DateTimeTimeZone(
date_time = "2022-01-25T00:00:00",
time_zone = "India Standard Time",
),
end_date_time = DateTimeTimeZone(
date_time = "2022-01-26T17:00:00",
time_zone = "Pacific Standard Time",
),
)
result = await graph_client.solutions.booking_businesses.by_booking_business_id('bookingBusiness-id').get_staff_availability.post(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.