Skip to content

Commit 2e7dabd

Browse files
authored
Merge pull request #26724 from microsoftgraph/main
Merge to publish.
2 parents ee4deef + e2aafd2 commit 2e7dabd

File tree

65 files changed

+3165
-70
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3165
-70
lines changed

api-reference/beta/api/onedriveforbusinessrestoresession-post-driverestoreartifactsbulkadditionrequests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ For a list of possible error responses, see [Backup Storage API error responses]
7575

7676
### Request
7777

78-
The following example shows a request that adds a list of drives to the specified Onedrive for work or school restore session in a bulk operation.
78+
The following example shows a request that adds a list of drives to the specified OneDrive for work or school restore session in a bulk operation.
7979
# [HTTP](#tab/http)
8080
<!-- {
8181
"blockType": "request",
Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
---
2+
title: "scheduleChangeRequest: approveForUser"
3+
description: "Approve a scheduleChangeRequest object for a user."
4+
author: "lemikeshifts"
5+
ms.date: 03/31/2025
6+
ms.localizationpriority: medium
7+
ms.subservice: teams
8+
doc_type: apiPageType
9+
---
10+
11+
# scheduleChangeRequest: approveForUser
12+
13+
Namespace: microsoft.graph
14+
15+
[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]
16+
17+
Approve a [scheduleChangeRequest](../resources/schedulechangerequest.md) object for a user. This action only supports application permissions.
18+
19+
## Permissions
20+
21+
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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference).
22+
23+
Permissions for [offerShiftRequest](../resources/offershiftrequest.md):
24+
25+
<!-- {
26+
"blockType": "permissions",
27+
"name": "offershiftrequest-approveforuser-permissions"
28+
}
29+
-->
30+
[!INCLUDE [permissions-table](../includes/permissions/offershiftrequest-approveforuser-permissions.md)]
31+
32+
Permissions for [openShiftChangeRequest](../resources/openshiftchangerequest.md):
33+
34+
<!-- {
35+
"blockType": "permissions",
36+
"name": "openshiftchangerequest-approveforuser-permissions"
37+
}
38+
-->
39+
[!INCLUDE [permissions-table](../includes/permissions/openshiftchangerequest-approveforuser-permissions.md)]
40+
41+
Permissions for [swapShiftsChangeRequest](../resources/swapshiftschangerequest.md):
42+
43+
<!-- {
44+
"blockType": "permissions",
45+
"name": "swapshiftschangerequest-approveforuser-permissions"
46+
}
47+
-->
48+
[!INCLUDE [permissions-table](../includes/permissions/swapshiftschangerequest-approveforuser-permissions.md)]
49+
50+
Permissions for [timeOffRequest](../resources/timeoffrequest.md):
51+
52+
<!-- {
53+
"blockType": "permissions",
54+
"name": "timeoffrequest-approveforuser-permissions"
55+
}
56+
-->
57+
[!INCLUDE [permissions-table](../includes/permissions/timeoffrequest-approveforuser-permissions.md)]
58+
59+
## HTTP request
60+
61+
To approve an [offerShiftRequest](../resources/offershiftrequest.md) object for a user.
62+
63+
<!-- {
64+
"blockType": "ignored"
65+
}
66+
-->
67+
``` http
68+
POST /teams/{teamsId}/schedule/offerShiftRequests/{offerShiftRequestId}/approveForUser
69+
```
70+
71+
To approve an [openShiftChangeRequest](../resources/openshiftchangerequest.md) object for a user.
72+
73+
<!-- {
74+
"blockType": "ignored"
75+
}
76+
-->
77+
``` http
78+
POST /teams/{teamsId}/schedule/openShiftChangeRequests/{openShiftChangeRequestId}/approveForUser
79+
```
80+
81+
To approve a [swapShiftsChangeRequest](../resources/swapshiftschangerequest.md) object for a user.
82+
83+
<!-- {
84+
"blockType": "ignored"
85+
}
86+
-->
87+
``` http
88+
POST /teams/{teamId}/schedule/swapShiftsChangeRequests/{swapShiftChangeRequestId}/approveForUser
89+
```
90+
91+
To approve a [timeOffRequest](../resources/timeoffrequest.md) object for a user.
92+
93+
<!-- {
94+
"blockType": "ignored"
95+
}
96+
-->
97+
``` http
98+
POST /teams/{teamsId}/schedule/timeOffRequests/{timeOffRequestId}/approveForUser
99+
```
100+
101+
## Request headers
102+
103+
|Name|Description|
104+
|:---|:---|
105+
|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).|
106+
|Content-Type|application/json. Required.|
107+
108+
## Request body
109+
110+
In the request body, supply a JSON representation of the parameters.
111+
112+
|Parameter|Type|Description|
113+
|:---|:---|:---|
114+
|message|String|Custom message sent on approval. Optional.|
115+
|userId|String|ID of the user who approved the request. Required.|
116+
117+
## Response
118+
119+
If successful, this action returns a `204 No Content` response code.
120+
121+
## Examples
122+
123+
### Example 1: Approve an offer shift request for a user
124+
125+
The following example shows how to approve an [offerShiftRequest](../resources/offershiftrequest.md) for a user. Only the assignee can approve the request. For details, see the **assignedTo** property in [scheduleChangeRequest](../resources/schedulechangerequest.md).
126+
127+
#### Request
128+
129+
The following example shows a request.
130+
<!-- {
131+
"blockType": "request",
132+
"name": "offershiftrequestthis.approveforuser"
133+
}
134+
-->
135+
``` http
136+
POST https://graph.microsoft.com/beta/teams/8f23a3b1-b87f-4a62-b38f-24a5fa83fa29/schedule/offerShiftRequests/SREQ_bb7af804-9ca1-48d7-9a0c-aa5a9f447d3c/approveForUser
137+
Content-Type: application/json
138+
139+
{
140+
"message": "Approved!",
141+
"userId": "d2e7b5b2-0355-4c73-a543-08847b5b0884"
142+
}
143+
```
144+
145+
#### Response
146+
147+
The following example shows the response.
148+
<!-- {
149+
"blockType": "response",
150+
"truncated": true
151+
}
152+
-->
153+
``` http
154+
HTTP/1.1 204 No Content
155+
```
156+
157+
### Example 2: Approve an open shift change request for a user
158+
159+
The following example shows how to approve an [openShiftChangeRequest](../resources/openshiftchangerequest.md) for a user. The **userId** must be a team owner.
160+
161+
#### Request
162+
163+
The following example shows a request.
164+
<!-- {
165+
"blockType": "request",
166+
"name": "openshiftchangerequestthis.approveforuser"
167+
}
168+
-->
169+
``` http
170+
POST https://graph.microsoft.com/beta/teams/8f23a3b1-b87f-4a62-b38f-24a5fa83fa29/schedule/openShiftChangeRequests/SREQ_8f23a3b1-b87f-4a62-b38f-24a5fa83fa29/approveForUser
171+
Content-Type: application/json
172+
173+
{
174+
"message": "Approved.",
175+
"userId": "d2e7b5b2-0355-4c73-a543-08847b5b0884"
176+
}
177+
```
178+
179+
#### Response
180+
181+
The following example shows the response.
182+
<!-- {
183+
"blockType": "response",
184+
"truncated": true
185+
}
186+
-->
187+
``` http
188+
HTTP/1.1 204 No Content
189+
```
190+
191+
### Example 3: Approve a swap shift change request for a user
192+
193+
The following example shows how to approve a [swapShiftsChangeRequest](../resources/swapshiftschangerequest.md) for a user. Only the assignee can approve the request. For details, see the **assignedTo** property in [scheduleChangeRequest](../resources/schedulechangerequest.md).
194+
195+
#### Request
196+
197+
The following example shows a request.
198+
<!-- {
199+
"blockType": "request",
200+
"name": "swapShiftsChangeRequestthis.approveforuser"
201+
}
202+
-->
203+
``` http
204+
POST /teams/8f23a3b1-b87f-4a62-b38f-24a5fa83fa29/schedule/swapShiftsChangeRequests/SREQ_8f23a3b1-b87f-4a62-b38f-24a5fa83fa29/approveForUser
205+
Content-Type: application/json
206+
207+
{
208+
"message": "Approved.",
209+
"userId": "d2e7b5b2-0355-4c73-a543-08847b5b0884"
210+
}
211+
```
212+
213+
#### Response
214+
215+
The following example shows the response.
216+
<!-- {
217+
"blockType": "response",
218+
"truncated": true
219+
}
220+
-->
221+
``` http
222+
HTTP/1.1 204 No Content
223+
```
224+
225+
### Example 4: Approve a time off request for a user
226+
227+
The following example shows how to approve a [timeOffRequest](../resources/timeoffrequest.md) for a user. The **userId** must be a team owner (manager).
228+
229+
#### Request
230+
231+
The following example shows a request.
232+
<!-- {
233+
"blockType": "request",
234+
"name": "timeoffrequestthis.approveforuser"
235+
}
236+
-->
237+
``` http
238+
POST https://graph.microsoft.com/beta/teams/8f23a3b1-b87f-4a62-b38f-24a5fa83fa29/schedule/timeOffRequests/SREQ_bb7af804-9ca1-48d7-9a0c-aa5a9f447d3c/approveForUser
239+
Content-Type: application/json
240+
241+
{
242+
"message": "Approved!",
243+
"userId": "d2e7b5b2-0355-4c73-a543-08847b5b0884"
244+
}
245+
```
246+
247+
#### Response
248+
249+
The following example shows the response.
250+
<!-- {
251+
"blockType": "response",
252+
"truncated": true
253+
}
254+
-->
255+
``` http
256+
HTTP/1.1 204 No Content
257+
```

0 commit comments

Comments
 (0)