List bookingBusinesses

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

Get a collection of bookingbusiness objects that has been created for the tenant.

This operation returns only the id and displayName of each Bookings business in the collection. For performance considerations, it does not return other properties. You can get the other properties of a Bookings business by specifying its id in a GET operation.

You can also query for Bookings businesses by specifying a string in a query parameter to do substring matching among the businesses of a tenant. See an example below.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Bookings.Read.All, BookingsAppointment.ReadWrite.All, Bookings.ReadWrite.All, Bookings.Manage.All
Delegated (personal Microsoft account) Not supported.
Application Not supported.

HTTP request

GET /bookingBusinesses

Optional query parameters

This method supports the OData Query Parameters to help customize the response.

This method also supports the query parameter which accepts a string value. This parameter limits the GET results to businesses that match the specified string. You can see an example below.

Request headers

Name Description
Authorization Bearer {code}

Request body

Do not supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and collection of bookingBusiness objects in the response body.

Example

Request 1

The following example gets the Bookings businesses in a tenant.

GET https://graph.microsoft.com/beta/bookingBusinesses
Response 1

The following is an example of the response.

HTTP/1.1 200 OK
Content-type: application/json

{
    "@odata.context":"https://graph.microsoft.com/beta/$metadata#bookingBusinesses",
    "value":[
        {
            "id":"Contosolunchdelivery@M365B489948.onmicrosoft.com",
            "displayName":"Contoso lunch delivery",
        },
        {
            "id":"Fabrikam@M365B489948.onmicrosoft.com",
            "displayName":"Fabrikam",
        }
    ]
}

SDK sample code


GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var bookingBusinesses = await graphClient.BookingBusinesses
	.Request()
	.GetAsync();

Read the SDK documentation for details on how to add the SDK to your project and create an authProvider instance.

Request 2

The following example shows how to use the query parameter to get one or more matching Bookings businesses in the tenant.

GET https://graph.microsoft.com/beta/bookingBusinesses?query=Adventure
Response 2

The following is an example of the response.

HTTP/1.1 200 OK
Content-type: application/json

{
    "@odata.context":"https://graph.microsoft.com/beta/$metadata#bookingBusinesses",
    "value":[
        {
            "id":"AdventureWorksCycles@M365B960066.onmicrosoft.com",
            "displayName":"Adventure Works Cycles",
        }
    ]
}

SDK sample code


GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var bookingBusinesses = await graphClient.BookingBusinesses
	.Request()
	.GetAsync();

Read the SDK documentation for details on how to add the SDK to your project and create an authProvider instance.