| title | Get shift |
|---|---|
| description | Get a shift by ID. |
| author | akumar39 |
| ms.localizationpriority | medium |
| ms.subservice | teams |
| doc_type | apiPageType |
| ms.date | 04/05/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Retrieve the properties and relationships of a shift object by ID.
[!INCLUDE national-cloud-support]
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.
[!INCLUDE permissions-table]
GET /teams/{teamId}/schedule/shifts/{shiftId}This method does not support OData query parameters to customize the response.
| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| MS-APP-ACTS-AS (deprecated) | A user ID (GUID). Required only if the authorization token is an application token; otherwise, optional. The MS-APP-ACTS-AS header is deprecated and no longer required with application tokens. |
Don't supply a request body for this method.
If successful, this method returns a 200 OK response code and a shift object in the response body.
The following example shows a request.
GET https://graph.microsoft.com/beta/teams/{teamId}/schedule/shifts/{shiftId}
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"id": "SHFT_ca485cdd-a42c-4b93-9e6a-6fa54fd45fe1",
"createdDateTime": "2019-06-06T20:15:38.9Z",
"lastModifiedDateTime": "2019-11-18T01:12:08.318Z",
"schedulingGroupId": "TAG_d18fd675-3ac8-41b2-8038-d17fdac8b0d3",
"userId": "a7b0c8c4-3f5c-492f-ab13-40f0e0f0ffa8",
"draftShift": null,
"lastModifiedBy": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "1c717a55-febd-4850-b5f6-101f3a29972c",
"displayName": "Sumanth Lingom"
}
}
}