codeapp-js 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/AI/skills/autoreview/SKILL.md +69 -0
  2. package/AI/skills/connections/SKILL.md +4 -4
  3. package/AI/skills/dataverse/SKILL.md +4 -2
  4. package/AI/skills/frontend-design/SKILL.md +32 -20
  5. package/AI/skills/keyvault/SKILL.md +139 -0
  6. package/AI/skills/office365-groups/SKILL.md +46 -25
  7. package/AI/skills/office365-outlook/SKILL.md +56 -25
  8. package/AI/skills/office365-users/SKILL.md +41 -36
  9. package/AI/skills/sharepoint/SKILL.md +174 -31
  10. package/AI/skills/start/SKILL.md +38 -30
  11. package/codeApp/dist/connectors/autoreview.js +1654 -0
  12. package/codeApp/dist/connectors/office365groups.js +2995 -432
  13. package/{examples/outlook Demo/.power/schemas/office365/office365.Schema.json → codeApp/dist/connectors/office365outlook.js} +7439 -16
  14. package/codeApp/dist/connectors/office365users.js +2990 -349
  15. package/codeApp/dist/connectors/sharepoint.js +529 -308
  16. package/examples/combined demo/dist/connectors/office365outlook.js +28521 -0
  17. package/examples/combined demo/dist/connectors/office365users.js +3154 -0
  18. package/examples/combined demo/dist/index.js +2 -6
  19. package/examples/combined demo/power.config.json +1 -1
  20. package/examples/groups Demo/{.power/schemas/office365groups/office365groups.Schema.json → dist/connectors/office365groups.js } +3205 -2204
  21. package/examples/groups Demo/dist/index.js +1 -5
  22. package/examples/groups Demo/power.config.json +1 -1
  23. package/examples/myProfile/dist/connectors/office365users.js +3154 -0
  24. package/examples/myProfile/dist/index.js +1 -5
  25. package/examples/myProfile/power.config.json +1 -1
  26. package/examples/outlook Demo/dist/connectors/office365outlook.js +28521 -0
  27. package/examples/outlook Demo/dist/index.js +2 -5
  28. package/examples/outlook Demo/power.config.json +1 -1
  29. package/examples/sharePoint Demo/dist/connectors/sharepoint.js +687 -0
  30. package/examples/sharePoint Demo/dist/index.js +86 -127
  31. package/examples/sharePoint Demo/power.config.json +1 -1
  32. package/package.json +1 -1
  33. package/codeApp/.power/schemas/appschemas/dataSourcesInfo.ts +0 -6275
  34. package/codeApp/.power/schemas/jira/jira.Schema.json +0 -6903
  35. package/codeApp/.power/schemas/keyvault/keyvault.Schema.json +0 -1600
  36. package/codeApp/.power/schemas/office365groups/office365groups.Schema.json +0 -2204
  37. package/codeApp/.power/schemas/teams/teams.Schema.json +0 -11112
  38. package/codeApp/dist/connectors/outlook.js +0 -1393
  39. package/codeApp/src/generated/index.ts +0 -12
  40. package/codeApp/src/generated/models/AzureKeyVaultModel.ts +0 -107
  41. package/codeApp/src/generated/models/JiraModel.ts +0 -501
  42. package/codeApp/src/generated/models/Office365GroupsModel.ts +0 -363
  43. package/codeApp/src/generated/models/Office365OutlookModel.ts +0 -2046
  44. package/codeApp/src/generated/models/Office365UsersModel.ts +0 -254
  45. package/codeApp/src/generated/services/AzureKeyVaultService.ts +0 -257
  46. package/codeApp/src/generated/services/JiraService.ts +0 -1124
  47. package/codeApp/src/generated/services/Office365GroupsService.ts +0 -326
  48. package/codeApp/src/generated/services/Office365OutlookService.ts +0 -2476
  49. package/codeApp/src/generated/services/Office365UsersService.ts +0 -358
  50. package/examples/apps/kanban/dist/dataverse.js +0 -94
  51. package/examples/apps/kanban/dist/environmentVar.js +0 -55
  52. package/examples/apps/kanban/dist/index.css +0 -605
  53. package/examples/apps/kanban/dist/index.html +0 -21
  54. package/examples/apps/kanban/dist/index.js +0 -860
  55. package/examples/apps/kanban/dist/office365groups.js +0 -97
  56. package/examples/apps/kanban/dist/office365users.js +0 -451
  57. package/examples/apps/kanban/dist/outlook.js +0 -162
  58. package/examples/apps/kanban/dist/power-apps-data.js +0 -2953
  59. package/examples/apps/kanban/dist/sharepoint.js +0 -435
  60. package/examples/apps/kanban/power.config.json +0 -35
  61. package/examples/apps/kanban/src/generated/index.ts +0 -14
  62. package/examples/apps/kanban/src/generated/models/Office365GroupsModel.ts +0 -363
  63. package/examples/apps/kanban/src/generated/models/Office365OutlookModel.ts +0 -2046
  64. package/examples/apps/kanban/src/generated/models/Office365UsersModel.ts +0 -254
  65. package/examples/apps/kanban/src/generated/services/Office365GroupsService.ts +0 -326
  66. package/examples/apps/kanban/src/generated/services/Office365OutlookService.ts +0 -2476
  67. package/examples/apps/kanban/src/generated/services/Office365UsersService.ts +0 -358
  68. package/examples/apps/planning Poker/additional files/AgilePoker_1_0_0_1.zip +0 -0
  69. package/examples/apps/planning Poker/additional files/PokerTables_1_0_0_1.zip +0 -0
  70. package/examples/apps/planning Poker/additional files/customizations (tables).xml +0 -6429
  71. package/examples/apps/planning Poker/additional files/dataverse-tables.json +0 -165
  72. package/examples/apps/planning Poker/additional files/readme.md +0 -122
  73. package/examples/apps/planning Poker/dist/dataverse.js +0 -78
  74. package/examples/apps/planning Poker/dist/index.html +0 -198
  75. package/examples/apps/planning Poker/dist/index.js +0 -955
  76. package/examples/apps/planning Poker/dist/power-apps-data.js +0 -2953
  77. package/examples/apps/planning Poker/dist/styles.css +0 -815
  78. package/examples/apps/planning Poker/power.config.json +0 -50
  79. package/examples/apps/solution explorer/dist/codeapp.js +0 -1098
  80. package/examples/apps/solution explorer/dist/icon-512.png +0 -0
  81. package/examples/apps/solution explorer/dist/index.html +0 -80
  82. package/examples/apps/solution explorer/dist/index.js +0 -735
  83. package/examples/apps/solution explorer/dist/power-apps-data.js +0 -3007
  84. package/examples/apps/solution explorer/dist/styles.css +0 -571
  85. package/examples/apps/solution explorer/power.config.json +0 -151
  86. package/examples/apps/todo/dist/dataverse.js +0 -64
  87. package/examples/apps/todo/dist/icon192.png +0 -0
  88. package/examples/apps/todo/dist/index.html +0 -75
  89. package/examples/apps/todo/dist/index.js +0 -9
  90. package/examples/apps/todo/dist/power-apps-data.js +0 -2953
  91. package/examples/apps/todo/dist/renderer.js +0 -375
  92. package/examples/apps/todo/dist/styles.css +0 -691
  93. package/examples/apps/todo/power.config.json +0 -35
  94. package/examples/combined demo/.power/schemas/appschemas/dataSourcesInfo.ts +0 -6275
  95. package/examples/combined demo/.power/schemas/jira/jira.Schema.json +0 -6903
  96. package/examples/combined demo/.power/schemas/keyvault/keyvault.Schema.json +0 -1600
  97. package/examples/combined demo/.power/schemas/teams/teams.Schema.json +0 -11112
  98. package/examples/combined demo/dist/office365users.js +0 -513
  99. package/examples/combined demo/dist/outlook.js +0 -1393
  100. package/examples/combined demo/src/generated/index.ts +0 -12
  101. package/examples/combined demo/src/generated/models/AzureKeyVaultModel.ts +0 -107
  102. package/examples/combined demo/src/generated/models/JiraModel.ts +0 -501
  103. package/examples/combined demo/src/generated/models/Office365GroupsModel.ts +0 -363
  104. package/examples/combined demo/src/generated/models/Office365OutlookModel.ts +0 -2046
  105. package/examples/combined demo/src/generated/models/Office365UsersModel.ts +0 -254
  106. package/examples/combined demo/src/generated/services/AzureKeyVaultService.ts +0 -257
  107. package/examples/combined demo/src/generated/services/JiraService.ts +0 -1124
  108. package/examples/combined demo/src/generated/services/Office365GroupsService.ts +0 -326
  109. package/examples/combined demo/src/generated/services/Office365OutlookService.ts +0 -2476
  110. package/examples/combined demo/src/generated/services/Office365UsersService.ts +0 -358
  111. package/examples/groups Demo/.power/schemas/appschemas/dataSourcesInfo.ts +0 -613
  112. package/examples/groups Demo/dist/office365groups.js +0 -642
  113. package/examples/groups Demo/src/generated/index.ts +0 -10
  114. package/examples/groups Demo/src/generated/models/Office365GroupsModel.ts +0 -363
  115. package/examples/groups Demo/src/generated/services/Office365GroupsService.ts +0 -326
  116. package/examples/myProfile/dist/office365users.js +0 -517
  117. package/examples/outlook Demo/.power/schemas/appschemas/dataSourcesInfo.ts +0 -6512
  118. package/examples/outlook Demo/dist/outlook.js +0 -1393
  119. package/examples/outlook Demo/src/generated/index.ts +0 -10
  120. package/examples/outlook Demo/src/generated/models/Office365OutlookModel.ts +0 -2046
  121. package/examples/outlook Demo/src/generated/services/Office365OutlookService.ts +0 -2476
  122. package/examples/sharePoint Demo/dist/sharepoint.js +0 -466
  123. package/examples/sharePoint Demo/src/generated/index.ts +0 -14
  124. package/examples/sharePoint Demo/src/generated/models/Office365GroupsModel.ts +0 -363
  125. package/examples/sharePoint Demo/src/generated/models/Office365OutlookModel.ts +0 -2046
  126. package/examples/sharePoint Demo/src/generated/models/Office365UsersModel.ts +0 -254
  127. package/examples/sharePoint Demo/src/generated/services/Office365GroupsService.ts +0 -326
  128. package/examples/sharePoint Demo/src/generated/services/Office365OutlookService.ts +0 -2476
  129. package/examples/sharePoint Demo/src/generated/services/Office365UsersService.ts +0 -358
  130. package/readme.md +0 -590
@@ -0,0 +1,3154 @@
1
+ /*
2
+ * This file is autogenerated by CAP. Do not edit this file directly.
3
+ * Source metadata comes from PAC-generated artifacts under src/generated and .power/schemas.
4
+ */
5
+
6
+ import { getClient } from "../power-apps-data.js";
7
+ import { _dbgWrap, unwrapResult } from "../codeapp.js";
8
+
9
+ const schema = {
10
+ "name": "shared_office365users",
11
+ "id": "/providers/Microsoft.PowerApps/apis/shared_office365users",
12
+ "type": "Microsoft.PowerApps/apis",
13
+ "properties": {
14
+ "displayName": "Office 365 Users",
15
+ "iconUri": "https://conn-afd-prod-endpoint-bmc9bqahasf3grgk.b01.azurefd.net/releases/v1.0.1788/1.0.1788.4544/office365users/icon.png",
16
+ "iconBrandColor": "#FFFFFF",
17
+ "apiEnvironment": "Shared",
18
+ "isCustomApi": false,
19
+ "blobUrisAreProxied": false,
20
+ "connectionParameters": {
21
+ "Token": {
22
+ "type": "oauthSetting",
23
+ "oAuthSettings": {
24
+ "identityProvider": "office365usercertificate",
25
+ "clientId": "7ab7862c-4c57-491e-8a45-d52a7e023983",
26
+ "scopes": [],
27
+ "redirectMode": "GlobalPerConnector",
28
+ "redirectUrl": "https://global.consent.azure-apim.net/redirect/office365users",
29
+ "properties": {
30
+ "IsFirstParty": "True",
31
+ "IsOnbehalfofLoginSupported": true
32
+ },
33
+ "customParameters": {
34
+ "ResourceUri": {
35
+ "value": "https://graph.microsoft.com"
36
+ },
37
+ "loginUri": {
38
+ "value": "https://login.windows.net"
39
+ },
40
+ "LoginUriAAD": {
41
+ "value": "https://login.windows.net"
42
+ }
43
+ }
44
+ },
45
+ "uiDefinition": {
46
+ "displayName": "Log in with Office 365 Credentials",
47
+ "description": "Log in with Office 365 Credentials",
48
+ "tooltip": "Provide Office 365 Credentials",
49
+ "constraints": {
50
+ "required": "true"
51
+ }
52
+ }
53
+ },
54
+ "Token:TenantId": {
55
+ "type": "string",
56
+ "metadata": {
57
+ "sourceType": "AzureActiveDirectoryTenant"
58
+ },
59
+ "uiDefinition": {
60
+ "displayName": "Tenant",
61
+ "description": "The tenant ID of for the Microsoft Entra ID application",
62
+ "constraints": {
63
+ "required": "false",
64
+ "hidden": "true"
65
+ }
66
+ }
67
+ }
68
+ },
69
+ "swagger": {
70
+ "swagger": "2.0",
71
+ "info": {
72
+ "version": "1.0",
73
+ "title": "Office 365 Users",
74
+ "description": "Office 365 Users Connection provider lets you access user profiles in your organization using your Office 365 account. You can perform various actions such as get your profile, a user's profile, a user's manager or direct reports and also update a user profile.",
75
+ "x-ms-api-annotation": {
76
+ "status": "Production"
77
+ },
78
+ "contact": {
79
+ "name": "Office 365 Users",
80
+ "url": "https://learn.microsoft.com/en-us/connectors/office365users/",
81
+ "email": "idcknowledgeeco@microsoft.com"
82
+ }
83
+ },
84
+ "host": "unitedstates-002.azure-apim.net",
85
+ "basePath": "/apim/office365users",
86
+ "schemes": [
87
+ "https"
88
+ ],
89
+ "produces": [
90
+ "application/json"
91
+ ],
92
+ "paths": {
93
+ "/{connectionId}/codeless/v1.0/me": {
94
+ "patch": {
95
+ "summary": "Update my profile",
96
+ "description": "Updates the profile of the current user",
97
+ "operationId": "UpdateMyProfile",
98
+ "parameters": [
99
+ {
100
+ "name": "connectionId",
101
+ "in": "path",
102
+ "required": true,
103
+ "x-ms-visibility": "internal",
104
+ "type": "string"
105
+ },
106
+ {
107
+ "name": "body",
108
+ "in": "body",
109
+ "required": false,
110
+ "schema": {
111
+ "$ref": "#/definitions/GraphUserUpdateable_V1"
112
+ }
113
+ }
114
+ ],
115
+ "responses": {
116
+ "default": {
117
+ "description": "default"
118
+ }
119
+ },
120
+ "deprecated": false,
121
+ "x-ms-visibility": "advanced",
122
+ "x-ms-api-annotation": {
123
+ "status": "Production"
124
+ },
125
+ "externalDocs": {
126
+ "url": "https://docs.microsoft.com/connectors/office365users/#update-my-profile"
127
+ }
128
+ },
129
+ "get": {
130
+ "summary": "Get my profile (V2)",
131
+ "description": "Retrieves the profile of the current user. Learn more about available fields to select: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/user#properties",
132
+ "operationId": "MyProfile_V2",
133
+ "parameters": [
134
+ {
135
+ "name": "connectionId",
136
+ "in": "path",
137
+ "required": true,
138
+ "x-ms-visibility": "internal",
139
+ "type": "string"
140
+ },
141
+ {
142
+ "name": "$select",
143
+ "in": "query",
144
+ "required": false,
145
+ "type": "string",
146
+ "description": "Comma separated list of fields to select. Example: surname, department, jobTitle",
147
+ "x-ms-summary": "Select fields",
148
+ "x-ms-visibility": "advanced"
149
+ }
150
+ ],
151
+ "deprecated": false,
152
+ "x-ms-api-annotation": {
153
+ "status": "Production",
154
+ "family": "MyProfile",
155
+ "revision": 2
156
+ },
157
+ "responses": {
158
+ "200": {
159
+ "description": "OK",
160
+ "schema": {
161
+ "$ref": "#/definitions/GraphUser_V1"
162
+ }
163
+ }
164
+ },
165
+ "externalDocs": {
166
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-my-profile-(v2)"
167
+ }
168
+ }
169
+ },
170
+ "/{connectionId}/codeless/v1.0/me/photo/$value": {
171
+ "put": {
172
+ "summary": "Update my profile photo",
173
+ "description": "Updates the profile photo of the current user. The size of the photo must be less than 4 MB.",
174
+ "operationId": "UpdateMyPhoto",
175
+ "parameters": [
176
+ {
177
+ "name": "connectionId",
178
+ "in": "path",
179
+ "required": true,
180
+ "x-ms-visibility": "internal",
181
+ "type": "string"
182
+ },
183
+ {
184
+ "name": "body",
185
+ "in": "body",
186
+ "schema": {
187
+ "type": "string",
188
+ "format": "binary"
189
+ },
190
+ "required": true,
191
+ "description": "Image content",
192
+ "x-ms-summary": "Image content"
193
+ },
194
+ {
195
+ "name": "Content-Type",
196
+ "in": "header",
197
+ "type": "string",
198
+ "default": "image/jpeg",
199
+ "required": true,
200
+ "description": "Image content type (like 'image/jpeg')",
201
+ "x-ms-summary": "Content-Type",
202
+ "x-ms-visibility": "advanced"
203
+ }
204
+ ],
205
+ "responses": {
206
+ "default": {
207
+ "description": "default"
208
+ }
209
+ },
210
+ "deprecated": false,
211
+ "x-ms-visibility": "advanced",
212
+ "x-ms-api-annotation": {
213
+ "status": "Production"
214
+ },
215
+ "externalDocs": {
216
+ "url": "https://docs.microsoft.com/connectors/office365users/#update-my-profile-photo"
217
+ }
218
+ }
219
+ },
220
+ "/{connectionId}/codeless/beta/me/insights/trending": {
221
+ "get": {
222
+ "summary": "Get my trending documents",
223
+ "description": "Retrieves the trending documents for the signed in user",
224
+ "operationId": "MyTrendingDocuments",
225
+ "parameters": [
226
+ {
227
+ "name": "connectionId",
228
+ "in": "path",
229
+ "required": true,
230
+ "x-ms-visibility": "internal",
231
+ "type": "string"
232
+ },
233
+ {
234
+ "name": "$filter",
235
+ "in": "query",
236
+ "required": false,
237
+ "type": "string",
238
+ "description": "An OData filter to filter the resources selected. Filter selected resources on ResourceVisualization/Type or ResourceVisualization/containerType",
239
+ "x-ms-summary": "Filter query"
240
+ },
241
+ {
242
+ "name": "extractSensitivityLabel",
243
+ "in": "query",
244
+ "description": "Select if you want to extract Sensitivity label ( false, true).",
245
+ "required": false,
246
+ "x-ms-summary": "Extract Sensitivity Label",
247
+ "type": "boolean"
248
+ },
249
+ {
250
+ "name": "fetchSensitivityLabelMetadata",
251
+ "in": "query",
252
+ "required": false,
253
+ "description": "A boolean whether to fetch sensitivity label Metadata for associated LabelId.",
254
+ "x-ms-summary": "Sensitivity Label Metadata",
255
+ "type": "boolean"
256
+ }
257
+ ],
258
+ "responses": {
259
+ "200": {
260
+ "description": "200",
261
+ "schema": {
262
+ "description": "List of trending documents",
263
+ "type": "object",
264
+ "properties": {
265
+ "value": {
266
+ "type": "array",
267
+ "items": {
268
+ "$ref": "#/definitions/GraphTrending"
269
+ },
270
+ "description": "value",
271
+ "x-ms-summary": "value"
272
+ }
273
+ }
274
+ }
275
+ }
276
+ },
277
+ "externalDocs": {
278
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-my-trending-documents"
279
+ }
280
+ }
281
+ },
282
+ "/{connectionId}/users/{userId}/relevantpeople": {
283
+ "get": {
284
+ "tags": [
285
+ "People"
286
+ ],
287
+ "summary": "Get relevant people",
288
+ "description": "Get relevant people.",
289
+ "operationId": "RelevantPeople",
290
+ "consumes": [],
291
+ "produces": [
292
+ "application/json",
293
+ "text/json",
294
+ "application/xml",
295
+ "text/xml"
296
+ ],
297
+ "parameters": [
298
+ {
299
+ "name": "connectionId",
300
+ "in": "path",
301
+ "required": true,
302
+ "x-ms-visibility": "internal",
303
+ "type": "string"
304
+ },
305
+ {
306
+ "name": "userId",
307
+ "in": "path",
308
+ "description": "User principal name or id.",
309
+ "required": true,
310
+ "x-ms-summary": "User (UPN)",
311
+ "type": "string"
312
+ }
313
+ ],
314
+ "responses": {
315
+ "200": {
316
+ "description": "OK",
317
+ "schema": {
318
+ "$ref": "#/definitions/LinklessEntityListResponse[List[Person]]"
319
+ }
320
+ },
321
+ "default": {
322
+ "description": "Operation Failed."
323
+ }
324
+ },
325
+ "deprecated": false,
326
+ "x-ms-visibility": "advanced",
327
+ "externalDocs": {
328
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-relevant-people"
329
+ }
330
+ }
331
+ },
332
+ "/{connectionId}/users/me": {
333
+ "get": {
334
+ "tags": [
335
+ "Users"
336
+ ],
337
+ "summary": "Get my profile (V1)",
338
+ "description": "Retrieves the profile of the current user.",
339
+ "operationId": "MyProfile",
340
+ "consumes": [],
341
+ "produces": [
342
+ "application/json",
343
+ "text/json",
344
+ "application/xml",
345
+ "text/xml"
346
+ ],
347
+ "responses": {
348
+ "200": {
349
+ "description": "Operation was successful",
350
+ "schema": {
351
+ "$ref": "#/definitions/User"
352
+ }
353
+ },
354
+ "202": {
355
+ "description": "Operation was successful"
356
+ },
357
+ "400": {
358
+ "description": "BadRequest"
359
+ },
360
+ "401": {
361
+ "description": "Unauthorized"
362
+ },
363
+ "403": {
364
+ "description": "Forbidden"
365
+ },
366
+ "500": {
367
+ "description": "Internal Server Error"
368
+ },
369
+ "default": {
370
+ "description": "Operation Failed."
371
+ }
372
+ },
373
+ "deprecated": true,
374
+ "x-ms-visibility": "advanced",
375
+ "x-ms-api-annotation": {
376
+ "status": "Production",
377
+ "family": "MyProfile",
378
+ "revision": 1
379
+ },
380
+ "externalDocs": {
381
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-my-profile-(v1)-%5bdeprecated%5d"
382
+ },
383
+ "parameters": [
384
+ {
385
+ "name": "connectionId",
386
+ "in": "path",
387
+ "required": true,
388
+ "x-ms-visibility": "internal",
389
+ "type": "string"
390
+ }
391
+ ]
392
+ }
393
+ },
394
+ "/{connectionId}/users/{userId}": {
395
+ "get": {
396
+ "tags": [
397
+ "Users"
398
+ ],
399
+ "summary": "Get user profile (V1)",
400
+ "description": "Retrieves the profile of a specific user.",
401
+ "operationId": "UserProfile",
402
+ "consumes": [],
403
+ "produces": [
404
+ "application/json",
405
+ "text/json",
406
+ "application/xml",
407
+ "text/xml"
408
+ ],
409
+ "parameters": [
410
+ {
411
+ "name": "connectionId",
412
+ "in": "path",
413
+ "required": true,
414
+ "x-ms-visibility": "internal",
415
+ "type": "string"
416
+ },
417
+ {
418
+ "name": "userId",
419
+ "in": "path",
420
+ "description": "User principal name or id.",
421
+ "required": true,
422
+ "x-ms-summary": "User (UPN)",
423
+ "type": "string"
424
+ }
425
+ ],
426
+ "responses": {
427
+ "200": {
428
+ "description": "Operation was successful",
429
+ "schema": {
430
+ "$ref": "#/definitions/User"
431
+ }
432
+ },
433
+ "202": {
434
+ "description": "Operation was successful"
435
+ },
436
+ "400": {
437
+ "description": "BadRequest"
438
+ },
439
+ "401": {
440
+ "description": "Unauthorized"
441
+ },
442
+ "403": {
443
+ "description": "Forbidden"
444
+ },
445
+ "500": {
446
+ "description": "Internal Server Error"
447
+ },
448
+ "default": {
449
+ "description": "Operation Failed."
450
+ }
451
+ },
452
+ "deprecated": true,
453
+ "x-ms-visibility": "advanced",
454
+ "x-ms-api-annotation": {
455
+ "status": "Production",
456
+ "family": "UserProfile",
457
+ "revision": 1
458
+ },
459
+ "externalDocs": {
460
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-user-profile-(v1)-%5bdeprecated%5d"
461
+ }
462
+ }
463
+ },
464
+ "/{connectionId}/users/photo": {
465
+ "get": {
466
+ "tags": [
467
+ "Users"
468
+ ],
469
+ "summary": "Get user photo metadata",
470
+ "description": "Get user photo metadata.",
471
+ "operationId": "UserPhotoMetadata",
472
+ "consumes": [],
473
+ "produces": [
474
+ "application/json",
475
+ "text/json",
476
+ "application/xml",
477
+ "text/xml"
478
+ ],
479
+ "parameters": [
480
+ {
481
+ "name": "connectionId",
482
+ "in": "path",
483
+ "required": true,
484
+ "x-ms-visibility": "internal",
485
+ "type": "string"
486
+ },
487
+ {
488
+ "name": "userId",
489
+ "in": "query",
490
+ "description": "User principal name or id.",
491
+ "required": true,
492
+ "x-ms-summary": "User (UPN)",
493
+ "type": "string"
494
+ }
495
+ ],
496
+ "responses": {
497
+ "200": {
498
+ "description": "OK",
499
+ "schema": {
500
+ "$ref": "#/definitions/ClientPhotoMetadata"
501
+ }
502
+ },
503
+ "default": {
504
+ "description": "Operation Failed."
505
+ }
506
+ },
507
+ "deprecated": false,
508
+ "externalDocs": {
509
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-user-photo-metadata"
510
+ }
511
+ }
512
+ },
513
+ "/{connectionId}/users/photo/value": {
514
+ "get": {
515
+ "tags": [
516
+ "Users"
517
+ ],
518
+ "summary": "Get user photo (V1)",
519
+ "description": "Retrieves the photo of the specified user if they have one.",
520
+ "operationId": "UserPhoto",
521
+ "consumes": [],
522
+ "produces": [],
523
+ "parameters": [
524
+ {
525
+ "name": "connectionId",
526
+ "in": "path",
527
+ "required": true,
528
+ "x-ms-visibility": "internal",
529
+ "type": "string"
530
+ },
531
+ {
532
+ "name": "userId",
533
+ "in": "query",
534
+ "description": "User principal name or id.",
535
+ "required": true,
536
+ "x-ms-summary": "User (UPN)",
537
+ "type": "string"
538
+ }
539
+ ],
540
+ "responses": {
541
+ "200": {
542
+ "description": "OK",
543
+ "schema": {
544
+ "format": "binary",
545
+ "type": "string",
546
+ "x-ms-media-kind": "image",
547
+ "x-ms-summary": "Image file content"
548
+ }
549
+ },
550
+ "default": {
551
+ "description": "Operation Failed."
552
+ }
553
+ },
554
+ "deprecated": true,
555
+ "x-ms-visibility": "advanced",
556
+ "x-ms-api-annotation": {
557
+ "status": "Production",
558
+ "family": "UserPhoto",
559
+ "revision": 1
560
+ },
561
+ "externalDocs": {
562
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-user-photo-(v1)-%5bdeprecated%5d"
563
+ }
564
+ }
565
+ },
566
+ "/{connectionId}/users/{userId}/manager": {
567
+ "get": {
568
+ "tags": [
569
+ "Users"
570
+ ],
571
+ "summary": "Get manager (V1)",
572
+ "description": "Retrieves the profile of the specified user's manager.",
573
+ "operationId": "Manager",
574
+ "consumes": [],
575
+ "produces": [
576
+ "application/json",
577
+ "text/json",
578
+ "application/xml",
579
+ "text/xml"
580
+ ],
581
+ "parameters": [
582
+ {
583
+ "name": "connectionId",
584
+ "in": "path",
585
+ "required": true,
586
+ "x-ms-visibility": "internal",
587
+ "type": "string"
588
+ },
589
+ {
590
+ "name": "userId",
591
+ "in": "path",
592
+ "description": "User principal name or id.",
593
+ "required": true,
594
+ "x-ms-summary": "User (UPN)",
595
+ "type": "string"
596
+ }
597
+ ],
598
+ "responses": {
599
+ "200": {
600
+ "description": "Operation was successful",
601
+ "schema": {
602
+ "$ref": "#/definitions/User"
603
+ }
604
+ },
605
+ "202": {
606
+ "description": "Operation was successful"
607
+ },
608
+ "400": {
609
+ "description": "BadRequest"
610
+ },
611
+ "401": {
612
+ "description": "Unauthorized"
613
+ },
614
+ "403": {
615
+ "description": "Forbidden"
616
+ },
617
+ "500": {
618
+ "description": "Internal Server Error"
619
+ },
620
+ "default": {
621
+ "description": "Operation Failed."
622
+ }
623
+ },
624
+ "deprecated": true,
625
+ "x-ms-visibility": "advanced",
626
+ "x-ms-api-annotation": {
627
+ "status": "Production",
628
+ "family": "Manager",
629
+ "revision": 1
630
+ },
631
+ "externalDocs": {
632
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-manager-(v1)-%5bdeprecated%5d"
633
+ }
634
+ }
635
+ },
636
+ "/{connectionId}/users/{userId}/directReports": {
637
+ "get": {
638
+ "tags": [
639
+ "Users"
640
+ ],
641
+ "summary": "Get direct reports (V1)",
642
+ "description": "Retrieves the user profiles of the specified user's direct reports.",
643
+ "operationId": "DirectReports",
644
+ "consumes": [],
645
+ "produces": [
646
+ "application/json",
647
+ "text/json",
648
+ "application/xml",
649
+ "text/xml"
650
+ ],
651
+ "parameters": [
652
+ {
653
+ "name": "connectionId",
654
+ "in": "path",
655
+ "required": true,
656
+ "x-ms-visibility": "internal",
657
+ "type": "string"
658
+ },
659
+ {
660
+ "name": "userId",
661
+ "in": "path",
662
+ "description": "User principal name or id.",
663
+ "required": true,
664
+ "x-ms-summary": "User (UPN)",
665
+ "type": "string"
666
+ }
667
+ ],
668
+ "responses": {
669
+ "200": {
670
+ "description": "Operation was successful",
671
+ "schema": {
672
+ "type": "array",
673
+ "items": {
674
+ "$ref": "#/definitions/User"
675
+ }
676
+ }
677
+ },
678
+ "202": {
679
+ "description": "Operation was successful"
680
+ },
681
+ "400": {
682
+ "description": "BadRequest"
683
+ },
684
+ "401": {
685
+ "description": "Unauthorized"
686
+ },
687
+ "403": {
688
+ "description": "Forbidden"
689
+ },
690
+ "500": {
691
+ "description": "Internal Server Error"
692
+ },
693
+ "default": {
694
+ "description": "Operation Failed."
695
+ }
696
+ },
697
+ "deprecated": true,
698
+ "x-ms-visibility": "advanced",
699
+ "x-ms-api-annotation": {
700
+ "status": "Production",
701
+ "family": "DirectReports",
702
+ "revision": 1
703
+ },
704
+ "externalDocs": {
705
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-direct-reports-(v1)-%5bdeprecated%5d"
706
+ }
707
+ }
708
+ },
709
+ "/{connectionId}/users": {
710
+ "get": {
711
+ "tags": [
712
+ "Users"
713
+ ],
714
+ "summary": "Search for users",
715
+ "description": "Retrieves the user profiles that match the search term.",
716
+ "operationId": "SearchUser",
717
+ "consumes": [],
718
+ "produces": [
719
+ "application/json",
720
+ "text/json",
721
+ "application/xml",
722
+ "text/xml"
723
+ ],
724
+ "parameters": [
725
+ {
726
+ "name": "connectionId",
727
+ "in": "path",
728
+ "required": true,
729
+ "x-ms-visibility": "internal",
730
+ "type": "string"
731
+ },
732
+ {
733
+ "name": "searchTerm",
734
+ "in": "query",
735
+ "description": "Search string (applies to: display name, given name, surname, mail, mail nickname and user principal name).",
736
+ "required": false,
737
+ "x-ms-summary": "Search term",
738
+ "type": "string"
739
+ },
740
+ {
741
+ "name": "top",
742
+ "in": "query",
743
+ "description": "Limit on the number of results to return. By default returns all entries.",
744
+ "required": false,
745
+ "x-ms-summary": "Top",
746
+ "x-ms-visibility": "advanced",
747
+ "type": "integer",
748
+ "format": "int32",
749
+ "default": 0
750
+ }
751
+ ],
752
+ "responses": {
753
+ "200": {
754
+ "description": "Operation was successful",
755
+ "schema": {
756
+ "type": "array",
757
+ "items": {
758
+ "$ref": "#/definitions/User"
759
+ }
760
+ }
761
+ },
762
+ "202": {
763
+ "description": "Operation was successful"
764
+ },
765
+ "400": {
766
+ "description": "BadRequest"
767
+ },
768
+ "401": {
769
+ "description": "Unauthorized"
770
+ },
771
+ "403": {
772
+ "description": "Forbidden"
773
+ },
774
+ "500": {
775
+ "description": "Internal Server Error"
776
+ },
777
+ "default": {
778
+ "description": "Operation Failed."
779
+ }
780
+ },
781
+ "deprecated": true,
782
+ "x-ms-visibility": "advanced",
783
+ "x-ms-api-annotation": {
784
+ "status": "Production",
785
+ "family": "SearchUser",
786
+ "revision": 1
787
+ },
788
+ "externalDocs": {
789
+ "url": "https://docs.microsoft.com/connectors/office365users/#search-for-users-%5bdeprecated%5d"
790
+ }
791
+ }
792
+ },
793
+ "/{connectionId}/v2/users": {
794
+ "get": {
795
+ "tags": [
796
+ "Users"
797
+ ],
798
+ "summary": "Search for users (V2)",
799
+ "description": "Retrieves the user profiles that match the search term (V2).",
800
+ "operationId": "SearchUserV2",
801
+ "consumes": [],
802
+ "produces": [
803
+ "application/json",
804
+ "text/json",
805
+ "application/xml",
806
+ "text/xml"
807
+ ],
808
+ "parameters": [
809
+ {
810
+ "name": "connectionId",
811
+ "in": "path",
812
+ "required": true,
813
+ "x-ms-visibility": "internal",
814
+ "type": "string"
815
+ },
816
+ {
817
+ "name": "searchTerm",
818
+ "in": "query",
819
+ "description": "Search string (applies to: display name, given name, surname, mail, mail nickname and user principal name).",
820
+ "required": false,
821
+ "x-ms-summary": "Search term",
822
+ "type": "string"
823
+ },
824
+ {
825
+ "name": "top",
826
+ "in": "query",
827
+ "description": "Limit on the number of results to return. Minimum value is 1. Default value is 1000.",
828
+ "required": false,
829
+ "x-ms-summary": "Top",
830
+ "x-ms-visibility": "advanced",
831
+ "type": "integer",
832
+ "format": "int32"
833
+ },
834
+ {
835
+ "name": "isSearchTermRequired",
836
+ "in": "query",
837
+ "description": "If set to 'Yes' then no user profiles will be returned when the search term is empty. If set to 'No' then no filtering will be applied when the search term is empty.",
838
+ "required": false,
839
+ "x-ms-summary": "Is search term required",
840
+ "x-ms-visibility": "advanced",
841
+ "type": "boolean",
842
+ "default": true
843
+ },
844
+ {
845
+ "name": "skipToken",
846
+ "in": "query",
847
+ "description": "Skip token to get next users.",
848
+ "required": false,
849
+ "x-ms-summary": "Skip token",
850
+ "x-ms-visibility": "internal",
851
+ "type": "string"
852
+ }
853
+ ],
854
+ "responses": {
855
+ "200": {
856
+ "description": "Operation was successful",
857
+ "schema": {
858
+ "$ref": "#/definitions/EntityListResponse[IReadOnlyList[User]]"
859
+ }
860
+ },
861
+ "202": {
862
+ "description": "Operation was successful"
863
+ },
864
+ "400": {
865
+ "description": "BadRequest"
866
+ },
867
+ "401": {
868
+ "description": "Unauthorized"
869
+ },
870
+ "403": {
871
+ "description": "Forbidden"
872
+ },
873
+ "500": {
874
+ "description": "Internal Server Error"
875
+ },
876
+ "default": {
877
+ "description": "Operation Failed."
878
+ }
879
+ },
880
+ "deprecated": false,
881
+ "x-ms-visibility": "advanced",
882
+ "x-ms-pageable": {
883
+ "nextLinkName": "@odata.nextLink"
884
+ },
885
+ "x-ms-api-annotation": {
886
+ "status": "Production",
887
+ "family": "SearchUser",
888
+ "revision": 2
889
+ },
890
+ "externalDocs": {
891
+ "url": "https://docs.microsoft.com/connectors/office365users/#search-for-users-(v2)"
892
+ }
893
+ }
894
+ },
895
+ "/{connectionId}/testconnection": {
896
+ "get": {
897
+ "tags": [
898
+ "Users"
899
+ ],
900
+ "summary": "Tests the connection",
901
+ "description": "Tests the connection.",
902
+ "operationId": "TestConnection",
903
+ "consumes": [],
904
+ "produces": [],
905
+ "responses": {
906
+ "200": {
907
+ "description": "OK"
908
+ },
909
+ "default": {
910
+ "description": "Operation Failed."
911
+ }
912
+ },
913
+ "deprecated": false,
914
+ "x-ms-visibility": "internal",
915
+ "externalDocs": {
916
+ "url": "https://docs.microsoft.com/connectors/office365users/#tests-the-connection"
917
+ },
918
+ "parameters": [
919
+ {
920
+ "name": "connectionId",
921
+ "in": "path",
922
+ "required": true,
923
+ "x-ms-visibility": "internal",
924
+ "type": "string"
925
+ }
926
+ ]
927
+ }
928
+ },
929
+ "/{connectionId}/codeless/v1.0/users/{id}": {
930
+ "get": {
931
+ "responses": {
932
+ "200": {
933
+ "description": "OK",
934
+ "schema": {
935
+ "$ref": "#/definitions/GraphUser_V1"
936
+ }
937
+ }
938
+ },
939
+ "summary": "Get user profile (V2)",
940
+ "description": "Retrieves the profile of a specific user. Learn more about available fields to select: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/user#properties",
941
+ "operationId": "UserProfile_V2",
942
+ "parameters": [
943
+ {
944
+ "name": "connectionId",
945
+ "in": "path",
946
+ "required": true,
947
+ "x-ms-visibility": "internal",
948
+ "type": "string"
949
+ },
950
+ {
951
+ "name": "id",
952
+ "in": "path",
953
+ "required": true,
954
+ "type": "string",
955
+ "description": "User principal name or id.",
956
+ "x-ms-summary": "User (UPN)"
957
+ },
958
+ {
959
+ "name": "$select",
960
+ "in": "query",
961
+ "required": false,
962
+ "type": "string",
963
+ "description": "Comma separated list of fields to select. Example: surname, department, jobTitle",
964
+ "x-ms-summary": "Select fields",
965
+ "x-ms-visibility": "advanced"
966
+ }
967
+ ],
968
+ "deprecated": false,
969
+ "x-ms-api-annotation": {
970
+ "status": "Production",
971
+ "family": "UserProfile",
972
+ "revision": 2
973
+ },
974
+ "externalDocs": {
975
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-user-profile-(v2)"
976
+ }
977
+ }
978
+ },
979
+ "/{connectionId}/codeless/v1.0/users/{id}/manager": {
980
+ "get": {
981
+ "responses": {
982
+ "200": {
983
+ "description": "OK",
984
+ "schema": {
985
+ "$ref": "#/definitions/GraphUser_V1"
986
+ }
987
+ }
988
+ },
989
+ "summary": "Get manager (V2)",
990
+ "description": "Retrieves the profile of the specified user's manager. Learn more about available fields to select: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/user#properties",
991
+ "operationId": "Manager_V2",
992
+ "parameters": [
993
+ {
994
+ "name": "connectionId",
995
+ "in": "path",
996
+ "required": true,
997
+ "x-ms-visibility": "internal",
998
+ "type": "string"
999
+ },
1000
+ {
1001
+ "name": "id",
1002
+ "in": "path",
1003
+ "required": true,
1004
+ "type": "string",
1005
+ "description": "User principal name or id.",
1006
+ "x-ms-summary": "User (UPN)"
1007
+ },
1008
+ {
1009
+ "name": "$select",
1010
+ "in": "query",
1011
+ "required": false,
1012
+ "type": "string",
1013
+ "description": "Comma separated list of fields to select. Example: surname, department, jobTitle",
1014
+ "x-ms-summary": "Select fields",
1015
+ "x-ms-visibility": "advanced"
1016
+ }
1017
+ ],
1018
+ "deprecated": false,
1019
+ "x-ms-api-annotation": {
1020
+ "status": "Production",
1021
+ "family": "Manager",
1022
+ "revision": 2
1023
+ },
1024
+ "externalDocs": {
1025
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-manager-(v2)"
1026
+ }
1027
+ }
1028
+ },
1029
+ "/{connectionId}/codeless/v1.0/users/{id}/directReports": {
1030
+ "get": {
1031
+ "responses": {
1032
+ "200": {
1033
+ "description": "OK",
1034
+ "schema": {
1035
+ "description": "List of direct reports",
1036
+ "type": "object",
1037
+ "properties": {
1038
+ "value": {
1039
+ "description": "Value",
1040
+ "type": "array",
1041
+ "items": {
1042
+ "$ref": "#/definitions/GraphUser_V1"
1043
+ }
1044
+ }
1045
+ }
1046
+ }
1047
+ }
1048
+ },
1049
+ "summary": "Get direct reports (V2)",
1050
+ "description": "Retrieves the user profiles of the specified user's direct reports. Learn more about available fields to select: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/user#properties",
1051
+ "operationId": "DirectReports_V2",
1052
+ "parameters": [
1053
+ {
1054
+ "name": "connectionId",
1055
+ "in": "path",
1056
+ "required": true,
1057
+ "x-ms-visibility": "internal",
1058
+ "type": "string"
1059
+ },
1060
+ {
1061
+ "name": "id",
1062
+ "in": "path",
1063
+ "required": true,
1064
+ "type": "string",
1065
+ "description": "User principal name or id.",
1066
+ "x-ms-summary": "User (UPN)"
1067
+ },
1068
+ {
1069
+ "name": "$select",
1070
+ "in": "query",
1071
+ "required": false,
1072
+ "type": "string",
1073
+ "description": "Comma separated list of fields to select. Example: surname, department, jobTitle",
1074
+ "x-ms-summary": "Select fields",
1075
+ "x-ms-visibility": "advanced"
1076
+ },
1077
+ {
1078
+ "name": "$top",
1079
+ "in": "query",
1080
+ "description": "Limit on the number of results to return. By default returns all entries.",
1081
+ "required": false,
1082
+ "x-ms-summary": "Top",
1083
+ "x-ms-visibility": "advanced",
1084
+ "type": "integer",
1085
+ "format": "int32"
1086
+ }
1087
+ ],
1088
+ "deprecated": false,
1089
+ "x-ms-api-annotation": {
1090
+ "status": "Production",
1091
+ "family": "DirectReports",
1092
+ "revision": 2
1093
+ },
1094
+ "externalDocs": {
1095
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-direct-reports-(v2)"
1096
+ }
1097
+ }
1098
+ },
1099
+ "/{connectionId}/codeless/v1.0/users/{id}/photo/$value": {
1100
+ "get": {
1101
+ "summary": "Get user photo (V2)",
1102
+ "description": "Retrieves the photo of the specified user if they have one",
1103
+ "operationId": "UserPhoto_V2",
1104
+ "consumes": [],
1105
+ "produces": [],
1106
+ "parameters": [
1107
+ {
1108
+ "name": "connectionId",
1109
+ "in": "path",
1110
+ "required": true,
1111
+ "x-ms-visibility": "internal",
1112
+ "type": "string"
1113
+ },
1114
+ {
1115
+ "name": "id",
1116
+ "in": "path",
1117
+ "required": true,
1118
+ "type": "string",
1119
+ "description": "User principal name or id.",
1120
+ "x-ms-summary": "User (UPN)"
1121
+ }
1122
+ ],
1123
+ "responses": {
1124
+ "200": {
1125
+ "description": "OK",
1126
+ "schema": {
1127
+ "format": "binary",
1128
+ "type": "string",
1129
+ "x-ms-media-kind": "image",
1130
+ "x-ms-summary": "Image file content"
1131
+ }
1132
+ }
1133
+ },
1134
+ "deprecated": false,
1135
+ "x-ms-api-annotation": {
1136
+ "status": "Production",
1137
+ "family": "UserPhoto",
1138
+ "revision": 2
1139
+ },
1140
+ "externalDocs": {
1141
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-user-photo-(v2)"
1142
+ }
1143
+ }
1144
+ },
1145
+ "/{connectionId}/codeless/beta/users/{id}/insights/trending": {
1146
+ "get": {
1147
+ "summary": "Get trending documents",
1148
+ "description": "Retrieves the trending documents for a user",
1149
+ "operationId": "TrendingDocuments",
1150
+ "parameters": [
1151
+ {
1152
+ "name": "connectionId",
1153
+ "in": "path",
1154
+ "required": true,
1155
+ "x-ms-visibility": "internal",
1156
+ "type": "string"
1157
+ },
1158
+ {
1159
+ "name": "id",
1160
+ "in": "path",
1161
+ "required": true,
1162
+ "type": "string",
1163
+ "description": "User principal name or id.",
1164
+ "x-ms-summary": "User (UPN)"
1165
+ },
1166
+ {
1167
+ "name": "$filter",
1168
+ "in": "query",
1169
+ "required": false,
1170
+ "type": "string",
1171
+ "description": "An OData filter to filter the resources selected. Filter selected resources on ResourceVisualization/Type or ResourceVisualization/containerType",
1172
+ "x-ms-summary": "Filter query"
1173
+ },
1174
+ {
1175
+ "$ref": "#/parameters/extractSensitivityLabel"
1176
+ },
1177
+ {
1178
+ "$ref": "#/parameters/fetchSensitivityLabelMetadata"
1179
+ }
1180
+ ],
1181
+ "responses": {
1182
+ "200": {
1183
+ "description": "200",
1184
+ "schema": {
1185
+ "description": "List of trending documents",
1186
+ "type": "object",
1187
+ "properties": {
1188
+ "value": {
1189
+ "type": "array",
1190
+ "items": {
1191
+ "$ref": "#/definitions/GraphTrending"
1192
+ },
1193
+ "description": "value",
1194
+ "x-ms-summary": "value"
1195
+ }
1196
+ }
1197
+ }
1198
+ }
1199
+ },
1200
+ "externalDocs": {
1201
+ "url": "https://docs.microsoft.com/connectors/office365users/#get-trending-documents"
1202
+ }
1203
+ }
1204
+ },
1205
+ "/{connectionId}/codeless/httprequest": {
1206
+ "post": {
1207
+ "summary": "Send an HTTP request",
1208
+ "description": "Construct a Microsoft Graph REST API request to invoke. These segments are supported: 1st segement: /me, /users/<userId> 2nd segment: messages, mailFolders, events, calendar, calendars, outlook, inferenceClassification. Learn more: https://docs.microsoft.com/en-us/graph/use-the-api.",
1209
+ "operationId": "HttpRequest",
1210
+ "consumes": [],
1211
+ "produces": [],
1212
+ "parameters": [
1213
+ {
1214
+ "name": "connectionId",
1215
+ "in": "path",
1216
+ "required": true,
1217
+ "x-ms-visibility": "internal",
1218
+ "type": "string"
1219
+ },
1220
+ {
1221
+ "name": "Uri",
1222
+ "in": "header",
1223
+ "description": "The full or relative URI. Example: https://graph.microsoft.com/{version}/{resource}.",
1224
+ "required": true,
1225
+ "x-ms-summary": "URI",
1226
+ "type": "string"
1227
+ },
1228
+ {
1229
+ "name": "Method",
1230
+ "in": "header",
1231
+ "description": "The HTTP method (default is GET).",
1232
+ "default": "GET",
1233
+ "enum": [
1234
+ "GET",
1235
+ "POST",
1236
+ "PUT",
1237
+ "PATCH",
1238
+ "DELETE"
1239
+ ],
1240
+ "required": true,
1241
+ "x-ms-summary": "Method",
1242
+ "type": "string"
1243
+ },
1244
+ {
1245
+ "name": "Body",
1246
+ "in": "body",
1247
+ "description": "The request body content.",
1248
+ "required": false,
1249
+ "schema": {
1250
+ "format": "binary",
1251
+ "type": "string"
1252
+ },
1253
+ "x-ms-summary": "Body"
1254
+ },
1255
+ {
1256
+ "name": "ContentType",
1257
+ "in": "header",
1258
+ "description": "The content-type header for the body (default is application/json).",
1259
+ "required": false,
1260
+ "x-ms-summary": "Content-Type",
1261
+ "type": "string",
1262
+ "default": "application/json"
1263
+ },
1264
+ {
1265
+ "name": "CustomHeader1",
1266
+ "in": "header",
1267
+ "description": "Custom header 1. Specify in format: header-name: header-value",
1268
+ "required": false,
1269
+ "x-ms-summary": "CustomHeader1",
1270
+ "type": "string",
1271
+ "x-ms-visibility": "advanced"
1272
+ },
1273
+ {
1274
+ "name": "CustomHeader2",
1275
+ "in": "header",
1276
+ "description": "Custom header 2. Specify in format: header-name: header-value",
1277
+ "required": false,
1278
+ "x-ms-summary": "CustomHeader2",
1279
+ "type": "string",
1280
+ "x-ms-visibility": "advanced"
1281
+ },
1282
+ {
1283
+ "name": "CustomHeader3",
1284
+ "in": "header",
1285
+ "description": "Custom header 3. Specify in format: header-name: header-value",
1286
+ "required": false,
1287
+ "x-ms-summary": "CustomHeader3",
1288
+ "type": "string",
1289
+ "x-ms-visibility": "advanced"
1290
+ },
1291
+ {
1292
+ "name": "CustomHeader4",
1293
+ "in": "header",
1294
+ "description": "Custom header 4. Specify in format: header-name: header-value",
1295
+ "required": false,
1296
+ "x-ms-summary": "CustomHeader4",
1297
+ "type": "string",
1298
+ "x-ms-visibility": "advanced"
1299
+ },
1300
+ {
1301
+ "name": "CustomHeader5",
1302
+ "in": "header",
1303
+ "description": "Custom header 5. Specify in format: header-name: header-value",
1304
+ "required": false,
1305
+ "x-ms-summary": "CustomHeader5",
1306
+ "type": "string",
1307
+ "x-ms-visibility": "advanced"
1308
+ }
1309
+ ],
1310
+ "responses": {
1311
+ "200": {
1312
+ "description": "OK",
1313
+ "schema": {
1314
+ "$ref": "#/definitions/ObjectWithoutType"
1315
+ }
1316
+ },
1317
+ "default": {
1318
+ "description": "Operation Failed."
1319
+ }
1320
+ },
1321
+ "deprecated": false,
1322
+ "x-ms-visibility": "important",
1323
+ "x-ms-api-annotation": {
1324
+ "status": "Production"
1325
+ },
1326
+ "externalDocs": {
1327
+ "url": "https://docs.microsoft.com/connectors/office365users/#send-an-http-request"
1328
+ }
1329
+ }
1330
+ }
1331
+ },
1332
+ "definitions": {
1333
+ "GraphUserUpdateable_V1": {
1334
+ "description": "Updateable parts of user from Graph API",
1335
+ "type": "object",
1336
+ "properties": {
1337
+ "aboutMe": {
1338
+ "type": "string",
1339
+ "description": "About Me",
1340
+ "x-ms-summary": "About Me"
1341
+ },
1342
+ "birthday": {
1343
+ "type": "string",
1344
+ "format": "date-time",
1345
+ "description": "Birthday",
1346
+ "x-ms-summary": "Birthday"
1347
+ },
1348
+ "interests": {
1349
+ "type": "array",
1350
+ "items": {
1351
+ "type": "string"
1352
+ },
1353
+ "description": "Interests",
1354
+ "x-ms-summary": "Interests"
1355
+ },
1356
+ "mySite": {
1357
+ "type": "string",
1358
+ "description": "My Site",
1359
+ "x-ms-summary": "My Site"
1360
+ },
1361
+ "pastProjects": {
1362
+ "type": "array",
1363
+ "items": {
1364
+ "type": "string"
1365
+ },
1366
+ "description": "Past Projects",
1367
+ "x-ms-summary": "Past Projects"
1368
+ },
1369
+ "schools": {
1370
+ "type": "array",
1371
+ "items": {
1372
+ "type": "string"
1373
+ },
1374
+ "description": "Schools",
1375
+ "x-ms-summary": "Schools"
1376
+ },
1377
+ "skills": {
1378
+ "type": "array",
1379
+ "items": {
1380
+ "type": "string"
1381
+ },
1382
+ "description": "Skills",
1383
+ "x-ms-summary": "Skills"
1384
+ }
1385
+ }
1386
+ },
1387
+ "GraphTrending": {
1388
+ "description": "Trending documents from Graph API",
1389
+ "type": "object",
1390
+ "properties": {
1391
+ "id": {
1392
+ "type": "string",
1393
+ "description": "Unique identifier of the relationship",
1394
+ "x-ms-summary": "Id"
1395
+ },
1396
+ "weight": {
1397
+ "type": "number",
1398
+ "format": "float",
1399
+ "description": "Value indicating how much the document is currently trending",
1400
+ "x-ms-summary": "Weight"
1401
+ },
1402
+ "resourceVisualization": {
1403
+ "$ref": "#/definitions/resourceVisualization"
1404
+ },
1405
+ "sensitivityLabelInfo": {
1406
+ "type": "array",
1407
+ "items": {
1408
+ "$ref": "#/definitions/sensitivityLabelMetadata"
1409
+ }
1410
+ }
1411
+ }
1412
+ },
1413
+ "resourceVisualization": {
1414
+ "type": "object",
1415
+ "properties": {
1416
+ "title": {
1417
+ "type": "string",
1418
+ "description": "The item's title text",
1419
+ "x-ms-summary": "Title"
1420
+ },
1421
+ "type": {
1422
+ "type": "string",
1423
+ "description": "The item's media type (can be used for filtering for a specific file based on a specific type)",
1424
+ "x-ms-summary": "Type"
1425
+ },
1426
+ "mediaType": {
1427
+ "type": "string",
1428
+ "description": "The items media type (can be used for filtering for a specific type of file based on supported IANA Media MIME types)",
1429
+ "x-ms-summary": "Media type"
1430
+ },
1431
+ "previewImageUrl": {
1432
+ "type": "string",
1433
+ "description": "A URL leading to the preview image for the item",
1434
+ "x-ms-summary": "Preview image URL"
1435
+ },
1436
+ "previewText": {
1437
+ "type": "string",
1438
+ "description": "A preview text for the item",
1439
+ "x-ms-summary": "Preview text"
1440
+ },
1441
+ "containerWebUrl": {
1442
+ "type": "string",
1443
+ "description": "A path leading to the folder in which the item is stored",
1444
+ "x-ms-summary": "Container web URL"
1445
+ },
1446
+ "containerDisplayName": {
1447
+ "type": "string",
1448
+ "description": "A string describing where the item is stored",
1449
+ "x-ms-summary": "Container display name"
1450
+ },
1451
+ "containerType": {
1452
+ "type": "string",
1453
+ "description": "Can be used for filtering by the type of container in which the file is stored",
1454
+ "x-ms-summary": "Container type"
1455
+ }
1456
+ },
1457
+ "description": "resourceVisualization",
1458
+ "x-ms-summary": "Resource visualization"
1459
+ },
1460
+ "sensitivityLabelMetadata": {
1461
+ "type": "object",
1462
+ "properties": {
1463
+ "sensitivityLabelId": {
1464
+ "type": "string",
1465
+ "description": "SensitivityLabel Id.",
1466
+ "x-ms-summary": "SensitivityLabel Id",
1467
+ "title": "sensitivityLabelId"
1468
+ },
1469
+ "name": {
1470
+ "type": "string",
1471
+ "description": "SensitivityLabel name.",
1472
+ "x-ms-summary": "name",
1473
+ "title": "name"
1474
+ },
1475
+ "displayName": {
1476
+ "type": "string",
1477
+ "description": "SensitivityLabel displayName info",
1478
+ "x-ms-summary": "SensitivityLabel displayName info",
1479
+ "title": "displayName"
1480
+ },
1481
+ "tooltip": {
1482
+ "type": "string",
1483
+ "description": "SensitivityLabel details on tooltip.",
1484
+ "x-ms-summary": "tooltip info",
1485
+ "title": "tooltip"
1486
+ },
1487
+ "priority": {
1488
+ "type": "integer",
1489
+ "format": "int32",
1490
+ "description": "SensitivityLabel priority.",
1491
+ "x-ms-summary": "priority of SensitivityLabel",
1492
+ "title": "priority"
1493
+ },
1494
+ "color": {
1495
+ "type": "string",
1496
+ "description": "SensitivityLabel color.",
1497
+ "x-ms-summary": "color to be displayed for SensitivityLabel.",
1498
+ "title": "color"
1499
+ },
1500
+ "isEncrypted": {
1501
+ "type": "boolean",
1502
+ "description": " is SensitivityLabel Encrypted.",
1503
+ "x-ms-summary": "isEncrypted status of SensitivityLabel",
1504
+ "title": "isEncrypted"
1505
+ },
1506
+ "isEnabled": {
1507
+ "type": "boolean",
1508
+ "description": "Whether SensitivityLabel is Enabled.",
1509
+ "x-ms-summary": "Whether SensitivityLabel is Enabled.",
1510
+ "title": "isEnabled"
1511
+ },
1512
+ "isParent": {
1513
+ "type": "boolean",
1514
+ "description": "Whether SensitivityLabel is Parent.",
1515
+ "x-ms-summary": "Whether SensitivityLabel is Parent",
1516
+ "title": "isParent"
1517
+ },
1518
+ "parentSensitivityLabelId": {
1519
+ "type": "string",
1520
+ "description": "Parent SensitivityLabel Id.",
1521
+ "x-ms-summary": "Parent SensitivityLabel Id",
1522
+ "title": "parentSensitivityLabelId"
1523
+ }
1524
+ }
1525
+ },
1526
+ "LinklessEntityListResponse[List[Person]]": {
1527
+ "description": "Represents a list from the Graph API",
1528
+ "type": "object",
1529
+ "properties": {
1530
+ "value": {
1531
+ "description": "Value",
1532
+ "type": "array",
1533
+ "items": {
1534
+ "$ref": "#/definitions/Person"
1535
+ }
1536
+ }
1537
+ }
1538
+ },
1539
+ "Person": {
1540
+ "description": "Represents a Person",
1541
+ "type": "object",
1542
+ "properties": {
1543
+ "id": {
1544
+ "description": "A unique identifier for the Person object in the directory",
1545
+ "type": "string",
1546
+ "x-ms-summary": "Person id"
1547
+ },
1548
+ "displayName": {
1549
+ "description": "The person's display name",
1550
+ "type": "string",
1551
+ "x-ms-summary": "Display name"
1552
+ },
1553
+ "givenName": {
1554
+ "description": "The person's given name",
1555
+ "type": "string",
1556
+ "x-ms-summary": "Given name"
1557
+ },
1558
+ "surname": {
1559
+ "description": "The person's surname",
1560
+ "type": "string",
1561
+ "x-ms-summary": "Surname"
1562
+ },
1563
+ "birthday": {
1564
+ "description": "The person's birthday",
1565
+ "type": "string",
1566
+ "x-ms-summary": "Birthday"
1567
+ },
1568
+ "personNotes": {
1569
+ "description": "Free-form notes that the current user has taken about this person",
1570
+ "type": "string",
1571
+ "x-ms-summary": "Person Notes"
1572
+ },
1573
+ "isFavorite": {
1574
+ "description": "If the current user has flagged this person as a favorite",
1575
+ "type": "boolean",
1576
+ "x-ms-summary": "Is Favorite?"
1577
+ },
1578
+ "jobTitle": {
1579
+ "description": "The person's job title",
1580
+ "type": "string",
1581
+ "x-ms-summary": "Job title"
1582
+ },
1583
+ "companyName": {
1584
+ "description": "The name of the person's company",
1585
+ "type": "string",
1586
+ "x-ms-summary": "Company name"
1587
+ },
1588
+ "department": {
1589
+ "description": "The person's department",
1590
+ "type": "string",
1591
+ "x-ms-summary": "Department"
1592
+ },
1593
+ "officeLocation": {
1594
+ "description": "The location of the person's office",
1595
+ "type": "string",
1596
+ "x-ms-summary": "Office location"
1597
+ },
1598
+ "profession": {
1599
+ "description": "The person's profession",
1600
+ "type": "string",
1601
+ "x-ms-summary": "Profession"
1602
+ },
1603
+ "userPrincipalName": {
1604
+ "description": "The user principal name(UPN) of the user.The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name.The general format is alias @domain, where domain must be present in the tenant's collection of verified domains.",
1605
+ "type": "string",
1606
+ "x-ms-summary": "User Principal Name (UPN)"
1607
+ },
1608
+ "imAddress": {
1609
+ "description": "The person's VOIP SIP address",
1610
+ "type": "string",
1611
+ "x-ms-summary": "IM Address"
1612
+ },
1613
+ "scoredEmailAddresses": {
1614
+ "description": "Collection of the person's email addresses with a relevance score",
1615
+ "type": "array",
1616
+ "items": {
1617
+ "$ref": "#/definitions/ScoredEmailAddress"
1618
+ },
1619
+ "x-ms-summary": "Scored Email Addresses"
1620
+ },
1621
+ "phones": {
1622
+ "description": "The person's phone numbers",
1623
+ "type": "array",
1624
+ "items": {
1625
+ "$ref": "#/definitions/Phone"
1626
+ },
1627
+ "x-ms-summary": "Phones"
1628
+ }
1629
+ }
1630
+ },
1631
+ "ScoredEmailAddress": {
1632
+ "description": "Represents a scored email address",
1633
+ "type": "object",
1634
+ "properties": {
1635
+ "address": {
1636
+ "description": "The email address",
1637
+ "type": "string",
1638
+ "x-ms-summary": "Email Address"
1639
+ },
1640
+ "relevanceScore": {
1641
+ "format": "double",
1642
+ "description": "The relevance score of the email address. A relevance score is used as a sort key, in relation to the other returned results. A higher relevance score value corresponds to a more relevant result. Relevance is determined by the user's communication and collaboration patterns and business relationships.",
1643
+ "type": "number",
1644
+ "x-ms-summary": "Relevance Score"
1645
+ }
1646
+ }
1647
+ },
1648
+ "Phone": {
1649
+ "description": "Represents a phone number",
1650
+ "type": "object",
1651
+ "properties": {
1652
+ "number": {
1653
+ "description": "The phone number",
1654
+ "type": "string",
1655
+ "x-ms-summary": "Phone Number"
1656
+ },
1657
+ "type": {
1658
+ "description": "The type of phone number. Possible values: home, business, mobile, other, assistant, homeFax, businessFax, otherFax, pager, radio.",
1659
+ "type": "string",
1660
+ "x-ms-summary": "Phone Type"
1661
+ }
1662
+ }
1663
+ },
1664
+ "User": {
1665
+ "description": "Represents a User object in the directory",
1666
+ "required": [
1667
+ "Id"
1668
+ ],
1669
+ "type": "object",
1670
+ "properties": {
1671
+ "Id": {
1672
+ "description": "A unique identifier for the user object in the directory.",
1673
+ "type": "string",
1674
+ "x-ms-summary": "User id"
1675
+ },
1676
+ "AccountEnabled": {
1677
+ "description": "true if the account is enabled; otherwise, false. This property is required when a user is created.",
1678
+ "type": "boolean",
1679
+ "x-ms-summary": "Account enabled?"
1680
+ },
1681
+ "BusinessPhones": {
1682
+ "description": "A list of business phone numbers for the user",
1683
+ "type": "array",
1684
+ "items": {
1685
+ "type": "string"
1686
+ },
1687
+ "readOnly": true,
1688
+ "x-ms-summary": "Business phones"
1689
+ },
1690
+ "City": {
1691
+ "description": "The city in which the user is located.",
1692
+ "type": "string",
1693
+ "x-ms-summary": "City"
1694
+ },
1695
+ "CompanyName": {
1696
+ "description": "The name of the company in which the user works.",
1697
+ "type": "string",
1698
+ "x-ms-summary": "Company name"
1699
+ },
1700
+ "Country": {
1701
+ "description": "The country/region in which the user is located; for example, \"US\" or \"UK\".",
1702
+ "type": "string",
1703
+ "x-ms-summary": "Country"
1704
+ },
1705
+ "Department": {
1706
+ "description": "The name of the department in which the user works.",
1707
+ "type": "string",
1708
+ "x-ms-summary": "Department"
1709
+ },
1710
+ "DisplayName": {
1711
+ "description": "The name displayed in the address book for the user. This is usually the combination of the user's first name, middle initial and last name. This property is required when a user is created and it cannot be cleared during updates.",
1712
+ "type": "string",
1713
+ "x-ms-summary": "Display name"
1714
+ },
1715
+ "GivenName": {
1716
+ "description": "The given name (first name) of the user.",
1717
+ "type": "string",
1718
+ "x-ms-summary": "Given name"
1719
+ },
1720
+ "JobTitle": {
1721
+ "description": "The user’s job title.",
1722
+ "type": "string",
1723
+ "x-ms-summary": "Job title"
1724
+ },
1725
+ "Mail": {
1726
+ "description": "The SMTP/email address for the user, for example, \"jeff@contoso.onmicrosoft.com\". Read-Only.",
1727
+ "type": "string",
1728
+ "x-ms-summary": "Email"
1729
+ },
1730
+ "MailNickname": {
1731
+ "description": "The mail alias for the user. This property must be specified when a user is created.",
1732
+ "type": "string",
1733
+ "x-ms-summary": "Nickname"
1734
+ },
1735
+ "mobilePhone": {
1736
+ "description": "The primary cellular telephone number for the user.",
1737
+ "type": "string",
1738
+ "x-ms-visibility": "internal"
1739
+ },
1740
+ "OfficeLocation": {
1741
+ "description": "The office location in the user's place of business.",
1742
+ "type": "string",
1743
+ "x-ms-summary": "Office location"
1744
+ },
1745
+ "PostalCode": {
1746
+ "description": "The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.",
1747
+ "type": "string",
1748
+ "x-ms-summary": "Postal code"
1749
+ },
1750
+ "Surname": {
1751
+ "description": "The user's surname (family name or last name).",
1752
+ "type": "string",
1753
+ "x-ms-summary": "Surname"
1754
+ },
1755
+ "TelephoneNumber": {
1756
+ "description": "The primary cellular telephone number for the user.",
1757
+ "type": "string",
1758
+ "x-ms-summary": "Telephone number"
1759
+ },
1760
+ "UserPrincipalName": {
1761
+ "description": "The user principal name (UPN) of the user. The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user’s email name. The general format is alias@domain, where domain must be present in the tenant’s collection of verified domains.",
1762
+ "type": "string",
1763
+ "x-ms-summary": "User Principal Name (UPN)"
1764
+ }
1765
+ }
1766
+ },
1767
+ "ClientPhotoMetadata": {
1768
+ "description": "Photo Metadata class",
1769
+ "type": "object",
1770
+ "properties": {
1771
+ "HasPhoto": {
1772
+ "description": "Has photo",
1773
+ "type": "boolean",
1774
+ "x-ms-summary": "Has photo"
1775
+ },
1776
+ "Height": {
1777
+ "format": "int32",
1778
+ "description": "Height of photo",
1779
+ "type": "integer",
1780
+ "x-ms-summary": "Height"
1781
+ },
1782
+ "Width": {
1783
+ "format": "int32",
1784
+ "description": "Width of photo",
1785
+ "type": "integer",
1786
+ "x-ms-summary": "Width"
1787
+ },
1788
+ "ContentType": {
1789
+ "description": "Content Type of photo",
1790
+ "type": "string",
1791
+ "x-ms-summary": "ContentType"
1792
+ },
1793
+ "ImageFileExtension": {
1794
+ "description": "File extension for the photo (ex: \".jpg\")",
1795
+ "type": "string",
1796
+ "readOnly": true,
1797
+ "x-ms-summary": "Image File Extension"
1798
+ }
1799
+ }
1800
+ },
1801
+ "Object": {
1802
+ "type": "object",
1803
+ "properties": {}
1804
+ },
1805
+ "EntityListResponse[IReadOnlyList[User]]": {
1806
+ "description": "Class representing entity list response from an Office API.",
1807
+ "type": "object",
1808
+ "properties": {
1809
+ "value": {
1810
+ "description": "Value",
1811
+ "type": "array",
1812
+ "items": {
1813
+ "$ref": "#/definitions/User"
1814
+ }
1815
+ },
1816
+ "@odata.nextLink": {
1817
+ "description": "Next page link",
1818
+ "type": "string"
1819
+ }
1820
+ }
1821
+ },
1822
+ "GraphUser_V1": {
1823
+ "description": "User from Graph API",
1824
+ "type": "object",
1825
+ "properties": {
1826
+ "aboutMe": {
1827
+ "description": "About Me",
1828
+ "type": "string",
1829
+ "x-ms-summary": "About Me"
1830
+ },
1831
+ "accountEnabled": {
1832
+ "description": "true if the account is enabled; otherwise, false. This property is required when a user is created.",
1833
+ "type": "boolean",
1834
+ "x-ms-summary": "Account enabled?"
1835
+ },
1836
+ "birthday": {
1837
+ "description": "Birthday",
1838
+ "type": "string",
1839
+ "format": "date-time",
1840
+ "x-ms-summary": "Birthday"
1841
+ },
1842
+ "businessPhones": {
1843
+ "description": "Business Phones",
1844
+ "type": "array",
1845
+ "items": {
1846
+ "type": "string"
1847
+ },
1848
+ "x-ms-summary": "Business Phones"
1849
+ },
1850
+ "city": {
1851
+ "description": "The city in which the user is located.",
1852
+ "type": "string",
1853
+ "x-ms-summary": "City"
1854
+ },
1855
+ "companyName": {
1856
+ "description": "The name of the company in which the user works.",
1857
+ "type": "string",
1858
+ "x-ms-summary": "Company name"
1859
+ },
1860
+ "country": {
1861
+ "description": "The country/region in which the user is located; for example, \"US\" or \"UK\".",
1862
+ "type": "string",
1863
+ "x-ms-summary": "Country"
1864
+ },
1865
+ "department": {
1866
+ "description": "The name of the department in which the user works.",
1867
+ "type": "string",
1868
+ "x-ms-summary": "Department"
1869
+ },
1870
+ "displayName": {
1871
+ "description": "Display Name",
1872
+ "type": "string",
1873
+ "x-ms-summary": "Display Name"
1874
+ },
1875
+ "givenName": {
1876
+ "description": "Given Name",
1877
+ "type": "string",
1878
+ "x-ms-summary": "Given Name"
1879
+ },
1880
+ "hireDate": {
1881
+ "type": "string",
1882
+ "format": "date-time",
1883
+ "description": "Hire Date",
1884
+ "x-ms-summary": "Hire Date"
1885
+ },
1886
+ "id": {
1887
+ "description": "Id",
1888
+ "type": "string",
1889
+ "x-ms-summary": "Id"
1890
+ },
1891
+ "interests": {
1892
+ "type": "array",
1893
+ "items": {
1894
+ "type": "string"
1895
+ },
1896
+ "description": "Interests",
1897
+ "x-ms-summary": "Interests"
1898
+ },
1899
+ "jobTitle": {
1900
+ "description": "Job Title",
1901
+ "type": "string",
1902
+ "x-ms-summary": "Job Title"
1903
+ },
1904
+ "mail": {
1905
+ "description": "Mail",
1906
+ "type": "string",
1907
+ "x-ms-summary": "Mail"
1908
+ },
1909
+ "mailNickname": {
1910
+ "description": "The mail alias for the user. This property must be specified when a user is created.",
1911
+ "type": "string",
1912
+ "x-ms-summary": "Nickname"
1913
+ },
1914
+ "mobilePhone": {
1915
+ "description": "Mobile Phone",
1916
+ "type": "string",
1917
+ "x-ms-summary": "Mobile Phone"
1918
+ },
1919
+ "mySite": {
1920
+ "type": "string",
1921
+ "description": "My Site",
1922
+ "x-ms-summary": "My Site"
1923
+ },
1924
+ "officeLocation": {
1925
+ "description": "Office Location",
1926
+ "type": "string",
1927
+ "x-ms-summary": "Office Location"
1928
+ },
1929
+ "pastProjects": {
1930
+ "type": "array",
1931
+ "items": {
1932
+ "type": "string"
1933
+ },
1934
+ "description": "Past Projects",
1935
+ "x-ms-summary": "Past Projects"
1936
+ },
1937
+ "postalCode": {
1938
+ "description": "The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code.",
1939
+ "type": "string",
1940
+ "x-ms-summary": "Postal code"
1941
+ },
1942
+ "preferredLanguage": {
1943
+ "description": "Preferred Language",
1944
+ "type": "string",
1945
+ "x-ms-summary": "Preferred Language"
1946
+ },
1947
+ "preferredName": {
1948
+ "type": "string",
1949
+ "description": "Preferred Name",
1950
+ "x-ms-summary": "Preferred Name"
1951
+ },
1952
+ "responsibilities": {
1953
+ "type": "array",
1954
+ "items": {
1955
+ "type": "string"
1956
+ },
1957
+ "description": "Responsibilities",
1958
+ "x-ms-summary": "Responsibilities"
1959
+ },
1960
+ "schools": {
1961
+ "type": "array",
1962
+ "items": {
1963
+ "type": "string"
1964
+ },
1965
+ "description": "Schools",
1966
+ "x-ms-summary": "Schools"
1967
+ },
1968
+ "skills": {
1969
+ "type": "array",
1970
+ "items": {
1971
+ "type": "string"
1972
+ },
1973
+ "description": "Skills",
1974
+ "x-ms-summary": "Skills"
1975
+ },
1976
+ "state": {
1977
+ "type": "string",
1978
+ "description": "State",
1979
+ "x-ms-summary": "State"
1980
+ },
1981
+ "streetAddress": {
1982
+ "type": "string",
1983
+ "description": "Street Address",
1984
+ "x-ms-summary": "Street Address"
1985
+ },
1986
+ "surname": {
1987
+ "description": "Surname",
1988
+ "type": "string",
1989
+ "x-ms-summary": "Surname"
1990
+ },
1991
+ "userPrincipalName": {
1992
+ "description": "User Principal Name",
1993
+ "type": "string",
1994
+ "x-ms-summary": "User Principal Name"
1995
+ },
1996
+ "userType": {
1997
+ "type": "string",
1998
+ "description": "User Type",
1999
+ "x-ms-summary": "User Type"
2000
+ }
2001
+ }
2002
+ },
2003
+ "ObjectWithoutType": {}
2004
+ },
2005
+ "securityDefinitions": {
2006
+ "oauth2_auth": {
2007
+ "type": "oauth2",
2008
+ "flow": "accessCode",
2009
+ "authorizationUrl": "https://login.windows.net/common/oauth2/authorize",
2010
+ "tokenUrl": "https://login.windows.net/common/oauth2/authorize",
2011
+ "scopes": {
2012
+ "Sites.Read.All User.ReadBasic.All User.ReadWrite": "Sites.Read.All User.ReadBasic.All User.ReadWrite"
2013
+ }
2014
+ }
2015
+ },
2016
+ "security": [
2017
+ {
2018
+ "oauth2_auth": [
2019
+ "Sites.Read.All User.ReadBasic.All User.ReadWrite"
2020
+ ]
2021
+ }
2022
+ ],
2023
+ "tags": [],
2024
+ "x-ms-connector-metadata": [
2025
+ {
2026
+ "propertyName": "Website",
2027
+ "propertyValue": "https://www.office.com/"
2028
+ },
2029
+ {
2030
+ "propertyName": "Privacy policy",
2031
+ "propertyValue": "https://privacy.microsoft.com/"
2032
+ },
2033
+ {
2034
+ "propertyName": "Categories",
2035
+ "propertyValue": "AI;Business Intelligence"
2036
+ }
2037
+ ],
2038
+ "x-ms-capabilities": {
2039
+ "testConnection": {
2040
+ "operationId": "TestConnection",
2041
+ "parameters": {}
2042
+ }
2043
+ },
2044
+ "parameters": {
2045
+ "extractSensitivityLabel": {
2046
+ "name": "extractSensitivityLabel",
2047
+ "in": "query",
2048
+ "description": "Select if you want to extract Sensitivity label ( false, true).",
2049
+ "required": false,
2050
+ "x-ms-summary": "Extract Sensitivity Label",
2051
+ "type": "boolean"
2052
+ },
2053
+ "fetchSensitivityLabelMetadata": {
2054
+ "name": "fetchSensitivityLabelMetadata",
2055
+ "in": "query",
2056
+ "required": false,
2057
+ "description": "A boolean whether to fetch sensitivity label Metadata for associated LabelId.",
2058
+ "x-ms-summary": "Sensitivity Label Metadata",
2059
+ "type": "boolean"
2060
+ }
2061
+ },
2062
+ "externalDocs": {
2063
+ "url": "https://docs.microsoft.com/connectors/office365users"
2064
+ }
2065
+ },
2066
+ "runtimeUrls": [
2067
+ "https://unitedstates-002.azure-apim.net/apim/office365users"
2068
+ ],
2069
+ "primaryRuntimeUrl": "https://unitedstates-002.azure-apim.net/apim/office365users",
2070
+ "doNotUseApiHubNetRuntimeUrl": "https://unitedstates-002.azure-apim.net/apim/office365users",
2071
+ "metadata": {
2072
+ "source": "marketplace",
2073
+ "brandColor": "#FFFFFF",
2074
+ "useNewApimVersion": "true",
2075
+ "version": {
2076
+ "previous": "releases/v1.0.1788\\1.0.1788.4524",
2077
+ "current": "releases/v1.0.1788\\1.0.1788.4544"
2078
+ }
2079
+ },
2080
+ "capabilities": [
2081
+ "actions"
2082
+ ],
2083
+ "interfaces": {},
2084
+ "description": "Office 365 Users Connection provider lets you access user profiles in your organization using your Office 365 account. You can perform various actions such as get your profile, a user's profile, a user's manager or direct reports and also update a user profile.",
2085
+ "createdTime": "2018-07-10T17:18:13.5987777Z",
2086
+ "changedTime": "2026-03-01T05:07:41.6978892Z",
2087
+ "releaseTag": "Production",
2088
+ "tier": "Standard",
2089
+ "publisher": "Microsoft",
2090
+ "scopes": {
2091
+ "will": [
2092
+ "Read your full user profile",
2093
+ "Read the full profile of all users"
2094
+ ],
2095
+ "wont": [
2096
+ "Modify or delete any user-profile information"
2097
+ ]
2098
+ },
2099
+ "rateLimit": 0,
2100
+ "apiVersion": "None"
2101
+ }
2102
+ };
2103
+
2104
+ const DATA_SOURCE_NAME = "office365users";
2105
+
2106
+ const dataSourcesInfo = {
2107
+ [DATA_SOURCE_NAME]: {
2108
+ "tableId": "",
2109
+ "version": "",
2110
+ "primaryKey": "",
2111
+ "dataSourceType": "Connector",
2112
+ "apis": {
2113
+ "UpdateMyProfile": {
2114
+ "path": "/{connectionId}/codeless/v1.0/me",
2115
+ "method": "PATCH",
2116
+ "parameters": [
2117
+ {
2118
+ "name": "connectionId",
2119
+ "in": "path",
2120
+ "required": true,
2121
+ "type": "string"
2122
+ },
2123
+ {
2124
+ "name": "body",
2125
+ "in": "body",
2126
+ "required": false,
2127
+ "type": "object"
2128
+ }
2129
+ ]
2130
+ },
2131
+ "MyProfile_V2": {
2132
+ "path": "/{connectionId}/codeless/v1.0/me",
2133
+ "method": "GET",
2134
+ "parameters": [
2135
+ {
2136
+ "name": "connectionId",
2137
+ "in": "path",
2138
+ "required": true,
2139
+ "type": "string"
2140
+ },
2141
+ {
2142
+ "name": "$select",
2143
+ "in": "query",
2144
+ "required": false,
2145
+ "type": "string"
2146
+ }
2147
+ ]
2148
+ },
2149
+ "UpdateMyPhoto": {
2150
+ "path": "/{connectionId}/codeless/v1.0/me/photo/$value",
2151
+ "method": "PUT",
2152
+ "parameters": [
2153
+ {
2154
+ "name": "connectionId",
2155
+ "in": "path",
2156
+ "required": true,
2157
+ "type": "string"
2158
+ },
2159
+ {
2160
+ "name": "body",
2161
+ "in": "body",
2162
+ "required": true,
2163
+ "type": "object"
2164
+ },
2165
+ {
2166
+ "name": "Content-Type",
2167
+ "in": "header",
2168
+ "required": true,
2169
+ "type": "string",
2170
+ "default": "image/jpeg"
2171
+ }
2172
+ ]
2173
+ },
2174
+ "MyTrendingDocuments": {
2175
+ "path": "/{connectionId}/codeless/beta/me/insights/trending",
2176
+ "method": "GET",
2177
+ "parameters": [
2178
+ {
2179
+ "name": "connectionId",
2180
+ "in": "path",
2181
+ "required": true,
2182
+ "type": "string"
2183
+ },
2184
+ {
2185
+ "name": "$filter",
2186
+ "in": "query",
2187
+ "required": false,
2188
+ "type": "string"
2189
+ },
2190
+ {
2191
+ "name": "extractSensitivityLabel",
2192
+ "in": "query",
2193
+ "required": false,
2194
+ "type": "boolean"
2195
+ },
2196
+ {
2197
+ "name": "fetchSensitivityLabelMetadata",
2198
+ "in": "query",
2199
+ "required": false,
2200
+ "type": "boolean"
2201
+ }
2202
+ ]
2203
+ },
2204
+ "RelevantPeople": {
2205
+ "path": "/{connectionId}/users/{userId}/relevantpeople",
2206
+ "method": "GET",
2207
+ "parameters": [
2208
+ {
2209
+ "name": "connectionId",
2210
+ "in": "path",
2211
+ "required": true,
2212
+ "type": "string"
2213
+ },
2214
+ {
2215
+ "name": "userId",
2216
+ "in": "path",
2217
+ "required": true,
2218
+ "type": "string"
2219
+ }
2220
+ ]
2221
+ },
2222
+ "MyProfile": {
2223
+ "path": "/{connectionId}/users/me",
2224
+ "method": "GET",
2225
+ "parameters": [
2226
+ {
2227
+ "name": "connectionId",
2228
+ "in": "path",
2229
+ "required": true,
2230
+ "type": "string"
2231
+ }
2232
+ ]
2233
+ },
2234
+ "UserProfile": {
2235
+ "path": "/{connectionId}/users/{userId}",
2236
+ "method": "GET",
2237
+ "parameters": [
2238
+ {
2239
+ "name": "connectionId",
2240
+ "in": "path",
2241
+ "required": true,
2242
+ "type": "string"
2243
+ },
2244
+ {
2245
+ "name": "userId",
2246
+ "in": "path",
2247
+ "required": true,
2248
+ "type": "string"
2249
+ }
2250
+ ]
2251
+ },
2252
+ "UserPhotoMetadata": {
2253
+ "path": "/{connectionId}/users/photo",
2254
+ "method": "GET",
2255
+ "parameters": [
2256
+ {
2257
+ "name": "connectionId",
2258
+ "in": "path",
2259
+ "required": true,
2260
+ "type": "string"
2261
+ },
2262
+ {
2263
+ "name": "userId",
2264
+ "in": "query",
2265
+ "required": true,
2266
+ "type": "string"
2267
+ }
2268
+ ]
2269
+ },
2270
+ "UserPhoto": {
2271
+ "path": "/{connectionId}/users/photo/value",
2272
+ "method": "GET",
2273
+ "parameters": [
2274
+ {
2275
+ "name": "connectionId",
2276
+ "in": "path",
2277
+ "required": true,
2278
+ "type": "string"
2279
+ },
2280
+ {
2281
+ "name": "userId",
2282
+ "in": "query",
2283
+ "required": true,
2284
+ "type": "string"
2285
+ }
2286
+ ]
2287
+ },
2288
+ "Manager": {
2289
+ "path": "/{connectionId}/users/{userId}/manager",
2290
+ "method": "GET",
2291
+ "parameters": [
2292
+ {
2293
+ "name": "connectionId",
2294
+ "in": "path",
2295
+ "required": true,
2296
+ "type": "string"
2297
+ },
2298
+ {
2299
+ "name": "userId",
2300
+ "in": "path",
2301
+ "required": true,
2302
+ "type": "string"
2303
+ }
2304
+ ]
2305
+ },
2306
+ "DirectReports": {
2307
+ "path": "/{connectionId}/users/{userId}/directReports",
2308
+ "method": "GET",
2309
+ "parameters": [
2310
+ {
2311
+ "name": "connectionId",
2312
+ "in": "path",
2313
+ "required": true,
2314
+ "type": "string"
2315
+ },
2316
+ {
2317
+ "name": "userId",
2318
+ "in": "path",
2319
+ "required": true,
2320
+ "type": "string"
2321
+ }
2322
+ ]
2323
+ },
2324
+ "SearchUser": {
2325
+ "path": "/{connectionId}/users",
2326
+ "method": "GET",
2327
+ "parameters": [
2328
+ {
2329
+ "name": "connectionId",
2330
+ "in": "path",
2331
+ "required": true,
2332
+ "type": "string"
2333
+ },
2334
+ {
2335
+ "name": "searchTerm",
2336
+ "in": "query",
2337
+ "required": false,
2338
+ "type": "string"
2339
+ },
2340
+ {
2341
+ "name": "top",
2342
+ "in": "query",
2343
+ "required": false,
2344
+ "type": "integer",
2345
+ "default": 0
2346
+ }
2347
+ ]
2348
+ },
2349
+ "SearchUserV2": {
2350
+ "path": "/{connectionId}/v2/users",
2351
+ "method": "GET",
2352
+ "parameters": [
2353
+ {
2354
+ "name": "connectionId",
2355
+ "in": "path",
2356
+ "required": true,
2357
+ "type": "string"
2358
+ },
2359
+ {
2360
+ "name": "searchTerm",
2361
+ "in": "query",
2362
+ "required": false,
2363
+ "type": "string"
2364
+ },
2365
+ {
2366
+ "name": "top",
2367
+ "in": "query",
2368
+ "required": false,
2369
+ "type": "integer"
2370
+ },
2371
+ {
2372
+ "name": "isSearchTermRequired",
2373
+ "in": "query",
2374
+ "required": false,
2375
+ "type": "boolean",
2376
+ "default": true
2377
+ },
2378
+ {
2379
+ "name": "skipToken",
2380
+ "in": "query",
2381
+ "required": false,
2382
+ "type": "string"
2383
+ }
2384
+ ]
2385
+ },
2386
+ "TestConnection": {
2387
+ "path": "/{connectionId}/testconnection",
2388
+ "method": "GET",
2389
+ "parameters": [
2390
+ {
2391
+ "name": "connectionId",
2392
+ "in": "path",
2393
+ "required": true,
2394
+ "type": "string"
2395
+ }
2396
+ ]
2397
+ },
2398
+ "UserProfile_V2": {
2399
+ "path": "/{connectionId}/codeless/v1.0/users/{id}",
2400
+ "method": "GET",
2401
+ "parameters": [
2402
+ {
2403
+ "name": "connectionId",
2404
+ "in": "path",
2405
+ "required": true,
2406
+ "type": "string"
2407
+ },
2408
+ {
2409
+ "name": "id",
2410
+ "in": "path",
2411
+ "required": true,
2412
+ "type": "string"
2413
+ },
2414
+ {
2415
+ "name": "$select",
2416
+ "in": "query",
2417
+ "required": false,
2418
+ "type": "string"
2419
+ }
2420
+ ]
2421
+ },
2422
+ "Manager_V2": {
2423
+ "path": "/{connectionId}/codeless/v1.0/users/{id}/manager",
2424
+ "method": "GET",
2425
+ "parameters": [
2426
+ {
2427
+ "name": "connectionId",
2428
+ "in": "path",
2429
+ "required": true,
2430
+ "type": "string"
2431
+ },
2432
+ {
2433
+ "name": "id",
2434
+ "in": "path",
2435
+ "required": true,
2436
+ "type": "string"
2437
+ },
2438
+ {
2439
+ "name": "$select",
2440
+ "in": "query",
2441
+ "required": false,
2442
+ "type": "string"
2443
+ }
2444
+ ]
2445
+ },
2446
+ "DirectReports_V2": {
2447
+ "path": "/{connectionId}/codeless/v1.0/users/{id}/directReports",
2448
+ "method": "GET",
2449
+ "parameters": [
2450
+ {
2451
+ "name": "connectionId",
2452
+ "in": "path",
2453
+ "required": true,
2454
+ "type": "string"
2455
+ },
2456
+ {
2457
+ "name": "id",
2458
+ "in": "path",
2459
+ "required": true,
2460
+ "type": "string"
2461
+ },
2462
+ {
2463
+ "name": "$select",
2464
+ "in": "query",
2465
+ "required": false,
2466
+ "type": "string"
2467
+ },
2468
+ {
2469
+ "name": "$top",
2470
+ "in": "query",
2471
+ "required": false,
2472
+ "type": "integer"
2473
+ }
2474
+ ]
2475
+ },
2476
+ "UserPhoto_V2": {
2477
+ "path": "/{connectionId}/codeless/v1.0/users/{id}/photo/$value",
2478
+ "method": "GET",
2479
+ "parameters": [
2480
+ {
2481
+ "name": "connectionId",
2482
+ "in": "path",
2483
+ "required": true,
2484
+ "type": "string"
2485
+ },
2486
+ {
2487
+ "name": "id",
2488
+ "in": "path",
2489
+ "required": true,
2490
+ "type": "string"
2491
+ }
2492
+ ]
2493
+ },
2494
+ "TrendingDocuments": {
2495
+ "path": "/{connectionId}/codeless/beta/users/{id}/insights/trending",
2496
+ "method": "GET",
2497
+ "parameters": [
2498
+ {
2499
+ "name": "connectionId",
2500
+ "in": "path",
2501
+ "required": true,
2502
+ "type": "string"
2503
+ },
2504
+ {
2505
+ "name": "id",
2506
+ "in": "path",
2507
+ "required": true,
2508
+ "type": "string"
2509
+ },
2510
+ {
2511
+ "name": "$filter",
2512
+ "in": "query",
2513
+ "required": false,
2514
+ "type": "string"
2515
+ }
2516
+ ]
2517
+ },
2518
+ "HttpRequest": {
2519
+ "path": "/{connectionId}/codeless/httprequest",
2520
+ "method": "POST",
2521
+ "parameters": [
2522
+ {
2523
+ "name": "connectionId",
2524
+ "in": "path",
2525
+ "required": true,
2526
+ "type": "string"
2527
+ },
2528
+ {
2529
+ "name": "Uri",
2530
+ "in": "header",
2531
+ "required": true,
2532
+ "type": "string"
2533
+ },
2534
+ {
2535
+ "name": "Method",
2536
+ "in": "header",
2537
+ "required": true,
2538
+ "type": "string",
2539
+ "default": "GET"
2540
+ },
2541
+ {
2542
+ "name": "Body",
2543
+ "in": "body",
2544
+ "required": false,
2545
+ "type": "object"
2546
+ },
2547
+ {
2548
+ "name": "ContentType",
2549
+ "in": "header",
2550
+ "required": false,
2551
+ "type": "string",
2552
+ "default": "application/json"
2553
+ },
2554
+ {
2555
+ "name": "CustomHeader1",
2556
+ "in": "header",
2557
+ "required": false,
2558
+ "type": "string"
2559
+ },
2560
+ {
2561
+ "name": "CustomHeader2",
2562
+ "in": "header",
2563
+ "required": false,
2564
+ "type": "string"
2565
+ },
2566
+ {
2567
+ "name": "CustomHeader3",
2568
+ "in": "header",
2569
+ "required": false,
2570
+ "type": "string"
2571
+ },
2572
+ {
2573
+ "name": "CustomHeader4",
2574
+ "in": "header",
2575
+ "required": false,
2576
+ "type": "string"
2577
+ },
2578
+ {
2579
+ "name": "CustomHeader5",
2580
+ "in": "header",
2581
+ "required": false,
2582
+ "type": "string"
2583
+ }
2584
+ ]
2585
+ }
2586
+ }
2587
+ }
2588
+ };
2589
+
2590
+ const client = getClient(dataSourcesInfo);
2591
+
2592
+ async function executeConnectorOperation(operationName, parameters) {
2593
+ const payload = {
2594
+ connectorOperation: {
2595
+ tableName: DATA_SOURCE_NAME,
2596
+ operationName
2597
+ }
2598
+ };
2599
+
2600
+ if (parameters && Object.keys(parameters).length > 0) {
2601
+ payload.connectorOperation.parameters = parameters;
2602
+ }
2603
+
2604
+ const result = await client.executeAsync(payload);
2605
+ return unwrapResult(result);
2606
+ }
2607
+
2608
+ function isUsersObject(oValue) {
2609
+ return !!oValue && typeof oValue === "object" && !Array.isArray(oValue);
2610
+ }
2611
+
2612
+ function pickUsersValue() {
2613
+ for (let iIndex = 0; iIndex < arguments.length; iIndex += 1) {
2614
+ const oValue = arguments[iIndex];
2615
+ if (oValue !== undefined && oValue !== null) {
2616
+ return oValue;
2617
+ }
2618
+ }
2619
+
2620
+ return undefined;
2621
+ }
2622
+
2623
+ function setUsersIfDefined(oTarget, sKey, oValue) {
2624
+ if (oValue !== undefined && oValue !== null) {
2625
+ oTarget[sKey] = oValue;
2626
+ }
2627
+ }
2628
+
2629
+ function normalizeUsersSelect(oValue) {
2630
+ if (Array.isArray(oValue)) {
2631
+ return oValue.join(",");
2632
+ }
2633
+
2634
+ return oValue;
2635
+ }
2636
+
2637
+ function normalizeUsersSelectOptions(oOptions) {
2638
+ if (isUsersObject(oOptions)) {
2639
+ return oOptions;
2640
+ }
2641
+
2642
+ if (oOptions === undefined || oOptions === null) {
2643
+ return {};
2644
+ }
2645
+
2646
+ return { select: oOptions };
2647
+ }
2648
+
2649
+ function normalizeUsersDirectReportsOptions(oOptions) {
2650
+ if (isUsersObject(oOptions)) {
2651
+ return oOptions;
2652
+ }
2653
+
2654
+ if (typeof oOptions === "number") {
2655
+ return { top: oOptions };
2656
+ }
2657
+
2658
+ if (oOptions === undefined || oOptions === null) {
2659
+ return {};
2660
+ }
2661
+
2662
+ return { select: oOptions };
2663
+ }
2664
+
2665
+ function normalizeUsersSearchOptions(oOptions) {
2666
+ if (typeof oOptions === "string") {
2667
+ return { searchTerm: oOptions };
2668
+ }
2669
+
2670
+ return isUsersObject(oOptions) ? oOptions : {};
2671
+ }
2672
+
2673
+ function normalizeUsersTrendingOptions(oOptions) {
2674
+ if (typeof oOptions === "string") {
2675
+ return { filter: oOptions };
2676
+ }
2677
+
2678
+ return isUsersObject(oOptions) ? oOptions : {};
2679
+ }
2680
+
2681
+ function extractUsersSkipToken(sNextLink) {
2682
+ if (!sNextLink || typeof sNextLink !== "string") {
2683
+ return undefined;
2684
+ }
2685
+
2686
+ try {
2687
+ const oUrl = new URL(sNextLink);
2688
+ return pickUsersValue(
2689
+ oUrl.searchParams.get("skipToken"),
2690
+ oUrl.searchParams.get("$skiptoken"),
2691
+ oUrl.searchParams.get("$skipToken"),
2692
+ oUrl.searchParams.get("skiptoken")
2693
+ );
2694
+ } catch (oError) {
2695
+ return undefined;
2696
+ }
2697
+ }
2698
+
2699
+ function getUsersHeaderValue(oHeaders, sName) {
2700
+ if (!isUsersObject(oHeaders)) {
2701
+ return undefined;
2702
+ }
2703
+
2704
+ const sMatch = String(sName).toLowerCase();
2705
+ const aEntries = Object.entries(oHeaders);
2706
+ for (let iIndex = 0; iIndex < aEntries.length; iIndex += 1) {
2707
+ const [sHeaderName, oValue] = aEntries[iIndex];
2708
+ if (String(sHeaderName).toLowerCase() === sMatch) {
2709
+ return oValue;
2710
+ }
2711
+ }
2712
+
2713
+ return undefined;
2714
+ }
2715
+
2716
+ function normalizeUsersCustomHeaders(oHeaders, aCustomHeaders) {
2717
+ const aResolved = Array.isArray(aCustomHeaders) ? aCustomHeaders.filter((oValue) => oValue != null) : [];
2718
+
2719
+ if (!isUsersObject(oHeaders)) {
2720
+ return aResolved.slice(0, 5);
2721
+ }
2722
+
2723
+ const aEntries = Object.entries(oHeaders);
2724
+ for (let iIndex = 0; iIndex < aEntries.length; iIndex += 1) {
2725
+ const [sHeaderName, oValue] = aEntries[iIndex];
2726
+ if (oValue === undefined || oValue === null) {
2727
+ continue;
2728
+ }
2729
+
2730
+ if (String(sHeaderName).toLowerCase() === "content-type") {
2731
+ continue;
2732
+ }
2733
+
2734
+ aResolved.push(String(sHeaderName) + ": " + String(oValue));
2735
+ if (aResolved.length >= 5) {
2736
+ break;
2737
+ }
2738
+ }
2739
+
2740
+ return aResolved.slice(0, 5);
2741
+ }
2742
+
2743
+ const callUsersOperation = async (operationName, parameters = {}) => _dbgWrap("callUsersOperation", [operationName, parameters], async function() {
2744
+ return executeConnectorOperation(operationName, parameters);
2745
+ });
2746
+
2747
+ const openUsersHttpRequest = async ({ method = "GET", uri, headers, body, contentType, customHeaders } = {}) => _dbgWrap("openUsersHttpRequest", [{ method, uri, headers, body, contentType, customHeaders }], async function() {
2748
+ const aHeaders = normalizeUsersCustomHeaders(headers, customHeaders);
2749
+ return executeConnectorOperation("HttpRequest", {
2750
+ Uri: uri,
2751
+ Method: method,
2752
+ Body: body,
2753
+ ContentType: pickUsersValue(contentType, getUsersHeaderValue(headers, "Content-Type")),
2754
+ CustomHeader1: aHeaders[0],
2755
+ CustomHeader2: aHeaders[1],
2756
+ CustomHeader3: aHeaders[2],
2757
+ CustomHeader4: aHeaders[3],
2758
+ CustomHeader5: aHeaders[4]
2759
+ });
2760
+ });
2761
+
2762
+ const getMyProfile = async (oOptions) => _dbgWrap("getMyProfile", [oOptions], async function() {
2763
+ const oResolvedOptions = normalizeUsersSelectOptions(oOptions);
2764
+ const oParameters = {};
2765
+ setUsersIfDefined(oParameters, "$select", normalizeUsersSelect(pickUsersValue(oResolvedOptions.select, oResolvedOptions.$select)));
2766
+ return executeConnectorOperation("MyProfile_V2", oParameters);
2767
+ });
2768
+
2769
+ const getUserProfile = async (userId, oOptions) => _dbgWrap("getUserProfile", [userId, oOptions], async function() {
2770
+ if (isUsersObject(userId)) {
2771
+ oOptions = userId;
2772
+ userId = pickUsersValue(oOptions.userId, oOptions.id);
2773
+ }
2774
+
2775
+ const oResolvedOptions = normalizeUsersSelectOptions(oOptions);
2776
+ const oParameters = {
2777
+ id: userId
2778
+ };
2779
+ setUsersIfDefined(oParameters, "$select", normalizeUsersSelect(pickUsersValue(oResolvedOptions.select, oResolvedOptions.$select)));
2780
+ return executeConnectorOperation("UserProfile_V2", oParameters);
2781
+ });
2782
+
2783
+ const getManager = async (userId, oOptions) => _dbgWrap("getManager", [userId, oOptions], async function() {
2784
+ if (isUsersObject(userId)) {
2785
+ oOptions = userId;
2786
+ userId = pickUsersValue(oOptions.userId, oOptions.id);
2787
+ }
2788
+
2789
+ const oResolvedOptions = normalizeUsersSelectOptions(oOptions);
2790
+ const oParameters = {
2791
+ id: userId
2792
+ };
2793
+ setUsersIfDefined(oParameters, "$select", normalizeUsersSelect(pickUsersValue(oResolvedOptions.select, oResolvedOptions.$select)));
2794
+ return executeConnectorOperation("Manager_V2", oParameters);
2795
+ });
2796
+
2797
+ const getDirectReports = async (userId, oOptions) => _dbgWrap("getDirectReports", [userId, oOptions], async function() {
2798
+ if (isUsersObject(userId)) {
2799
+ oOptions = userId;
2800
+ userId = pickUsersValue(oOptions.userId, oOptions.id);
2801
+ }
2802
+
2803
+ const oResolvedOptions = normalizeUsersDirectReportsOptions(oOptions);
2804
+ const oParameters = {
2805
+ id: userId
2806
+ };
2807
+ setUsersIfDefined(oParameters, "$select", normalizeUsersSelect(pickUsersValue(oResolvedOptions.select, oResolvedOptions.$select)));
2808
+ setUsersIfDefined(oParameters, "$top", pickUsersValue(oResolvedOptions.top, oResolvedOptions.$top));
2809
+ return executeConnectorOperation("DirectReports_V2", oParameters);
2810
+ });
2811
+
2812
+ const getMyTrendingDocuments = async (oOptions = {}) => _dbgWrap("getMyTrendingDocuments", [oOptions], async function() {
2813
+ const oResolvedOptions = normalizeUsersTrendingOptions(oOptions);
2814
+ const oParameters = {};
2815
+ setUsersIfDefined(oParameters, "$filter", pickUsersValue(oResolvedOptions.filter, oResolvedOptions.$filter));
2816
+ setUsersIfDefined(oParameters, "extractSensitivityLabel", oResolvedOptions.extractSensitivityLabel);
2817
+ setUsersIfDefined(oParameters, "fetchSensitivityLabelMetadata", oResolvedOptions.fetchSensitivityLabelMetadata);
2818
+ return executeConnectorOperation("MyTrendingDocuments", oParameters);
2819
+ });
2820
+
2821
+ const getRelevantPeople = async (userId) => _dbgWrap("getRelevantPeople", [userId], async function() {
2822
+ if (isUsersObject(userId)) {
2823
+ userId = pickUsersValue(userId.userId, userId.id);
2824
+ }
2825
+
2826
+ return executeConnectorOperation("RelevantPeople", {
2827
+ userId
2828
+ });
2829
+ });
2830
+
2831
+ const getUserPhotoMetadata = async (userId) => _dbgWrap("getUserPhotoMetadata", [userId], async function() {
2832
+ if (isUsersObject(userId)) {
2833
+ userId = pickUsersValue(userId.userId, userId.id);
2834
+ }
2835
+
2836
+ return executeConnectorOperation("UserPhotoMetadata", {
2837
+ userId
2838
+ });
2839
+ });
2840
+
2841
+ const getUserPhoto = async (userId) => _dbgWrap("getUserPhoto", [userId], async function() {
2842
+ if (isUsersObject(userId)) {
2843
+ userId = pickUsersValue(userId.userId, userId.id);
2844
+ }
2845
+
2846
+ return executeConnectorOperation("UserPhoto_V2", {
2847
+ id: userId
2848
+ });
2849
+ });
2850
+
2851
+ const getTrendingDocuments = async (userId, oOptions = {}) => _dbgWrap("getTrendingDocuments", [userId, oOptions], async function() {
2852
+ if (isUsersObject(userId)) {
2853
+ oOptions = userId;
2854
+ userId = pickUsersValue(oOptions.userId, oOptions.id);
2855
+ }
2856
+
2857
+ const oResolvedOptions = normalizeUsersTrendingOptions(oOptions);
2858
+ const oParameters = {
2859
+ id: userId
2860
+ };
2861
+ setUsersIfDefined(oParameters, "$filter", pickUsersValue(oResolvedOptions.filter, oResolvedOptions.$filter));
2862
+ setUsersIfDefined(oParameters, "extractSensitivityLabel", oResolvedOptions.extractSensitivityLabel);
2863
+ setUsersIfDefined(oParameters, "fetchSensitivityLabelMetadata", oResolvedOptions.fetchSensitivityLabelMetadata);
2864
+ return executeConnectorOperation("TrendingDocuments", oParameters);
2865
+ });
2866
+
2867
+ const searchForUsers = async (oOptions = {}) => _dbgWrap("searchForUsers", [oOptions], async function() {
2868
+ const oResolvedOptions = normalizeUsersSearchOptions(oOptions);
2869
+ const oParameters = {};
2870
+ setUsersIfDefined(oParameters, "searchTerm", oResolvedOptions.searchTerm);
2871
+ setUsersIfDefined(oParameters, "top", pickUsersValue(oResolvedOptions.top, oResolvedOptions.$top));
2872
+ setUsersIfDefined(oParameters, "isSearchTermRequired", oResolvedOptions.isSearchTermRequired);
2873
+
2874
+ const oSkipToken = pickUsersValue(
2875
+ oResolvedOptions.skipToken,
2876
+ oResolvedOptions.$skipToken,
2877
+ oResolvedOptions.$skiptoken,
2878
+ extractUsersSkipToken(oResolvedOptions.nextLink),
2879
+ oResolvedOptions.skip
2880
+ );
2881
+
2882
+ if (oSkipToken !== undefined && oSkipToken !== null) {
2883
+ oParameters.skipToken = String(oSkipToken);
2884
+ }
2885
+
2886
+ return executeConnectorOperation("SearchUserV2", oParameters);
2887
+ });
2888
+
2889
+ /**
2890
+ * Update my profile
2891
+ * Updates the profile of the current user
2892
+ */
2893
+ const updateMyProfile = async (body) => _dbgWrap("UpdateMyProfile", [body], async function() {
2894
+ const parameters = {};
2895
+ const oBody = isUsersObject(body) && Object.prototype.hasOwnProperty.call(body, "body") ? body.body : body;
2896
+ if (oBody !== undefined) parameters["body"] = oBody;
2897
+ return executeConnectorOperation("UpdateMyProfile", parameters);
2898
+ });
2899
+
2900
+ /**
2901
+ * Get my profile (V2)
2902
+ * Retrieves the profile of the current user. Learn more about available fields to select: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/user#properties
2903
+ */
2904
+ const myProfile_V2 = async (select) => _dbgWrap("MyProfile_V2", [select], async function() {
2905
+ const parameters = {};
2906
+ if (select !== undefined) parameters["$select"] = select;
2907
+ return executeConnectorOperation("MyProfile_V2", parameters);
2908
+ });
2909
+
2910
+ /**
2911
+ * Update my profile photo
2912
+ * Updates the profile photo of the current user. The size of the photo must be less than 4 MB.
2913
+ */
2914
+ const updateMyPhoto = async (body, content_Type) => _dbgWrap("UpdateMyPhoto", [body, content_Type], async function() {
2915
+ const parameters = {};
2916
+ if (isUsersObject(body)) {
2917
+ content_Type = pickUsersValue(body.contentType, body.Content_Type, body.mimeType, content_Type);
2918
+ body = pickUsersValue(body.body, body.content, body.photo, body.fileContent);
2919
+ }
2920
+
2921
+ if (body !== undefined) parameters["body"] = body;
2922
+ if (content_Type !== undefined) parameters["Content_Type"] = content_Type;
2923
+ return executeConnectorOperation("UpdateMyPhoto", parameters);
2924
+ });
2925
+
2926
+ /**
2927
+ * Get my trending documents
2928
+ * Retrieves the trending documents for the signed in user
2929
+ */
2930
+ const myTrendingDocuments = async (filter, extractSensitivityLabel, fetchSensitivityLabelMetadata) => _dbgWrap("MyTrendingDocuments", [filter, extractSensitivityLabel, fetchSensitivityLabelMetadata], async function() {
2931
+ const parameters = {};
2932
+ if (filter !== undefined) parameters["$filter"] = filter;
2933
+ if (extractSensitivityLabel !== undefined) parameters["extractSensitivityLabel"] = extractSensitivityLabel;
2934
+ if (fetchSensitivityLabelMetadata !== undefined) parameters["fetchSensitivityLabelMetadata"] = fetchSensitivityLabelMetadata;
2935
+ return executeConnectorOperation("MyTrendingDocuments", parameters);
2936
+ });
2937
+
2938
+ /**
2939
+ * Get relevant people
2940
+ * Get relevant people.
2941
+ */
2942
+ const relevantPeople = async (userId) => _dbgWrap("RelevantPeople", [userId], async function() {
2943
+ const parameters = {};
2944
+ if (userId !== undefined) parameters["userId"] = userId;
2945
+ return executeConnectorOperation("RelevantPeople", parameters);
2946
+ });
2947
+
2948
+ /**
2949
+ * Get my profile (V1)
2950
+ * Retrieves the profile of the current user.
2951
+ */
2952
+ const myProfile = async () => _dbgWrap("MyProfile", [], async function() {
2953
+ return executeConnectorOperation("MyProfile");
2954
+ });
2955
+
2956
+ /**
2957
+ * Get user profile (V1)
2958
+ * Retrieves the profile of a specific user.
2959
+ */
2960
+ const userProfile = async (userId) => _dbgWrap("UserProfile", [userId], async function() {
2961
+ const parameters = {};
2962
+ if (userId !== undefined) parameters["userId"] = userId;
2963
+ return executeConnectorOperation("UserProfile", parameters);
2964
+ });
2965
+
2966
+ /**
2967
+ * Get user photo metadata
2968
+ * Get user photo metadata.
2969
+ */
2970
+ const userPhotoMetadata = async (userId) => _dbgWrap("UserPhotoMetadata", [userId], async function() {
2971
+ const parameters = {};
2972
+ if (userId !== undefined) parameters["userId"] = userId;
2973
+ return executeConnectorOperation("UserPhotoMetadata", parameters);
2974
+ });
2975
+
2976
+ /**
2977
+ * Get user photo (V1)
2978
+ * Retrieves the photo of the specified user if they have one.
2979
+ */
2980
+ const userPhoto = async (userId) => _dbgWrap("UserPhoto", [userId], async function() {
2981
+ const parameters = {};
2982
+ if (userId !== undefined) parameters["userId"] = userId;
2983
+ return executeConnectorOperation("UserPhoto", parameters);
2984
+ });
2985
+
2986
+ /**
2987
+ * Get manager (V1)
2988
+ * Retrieves the profile of the specified user's manager.
2989
+ */
2990
+ const manager = async (userId) => _dbgWrap("Manager", [userId], async function() {
2991
+ const parameters = {};
2992
+ if (userId !== undefined) parameters["userId"] = userId;
2993
+ return executeConnectorOperation("Manager", parameters);
2994
+ });
2995
+
2996
+ /**
2997
+ * Get direct reports (V1)
2998
+ * Retrieves the user profiles of the specified user's direct reports.
2999
+ */
3000
+ const directReports = async (userId) => _dbgWrap("DirectReports", [userId], async function() {
3001
+ const parameters = {};
3002
+ if (userId !== undefined) parameters["userId"] = userId;
3003
+ return executeConnectorOperation("DirectReports", parameters);
3004
+ });
3005
+
3006
+ /**
3007
+ * Search for users
3008
+ * Retrieves the user profiles that match the search term.
3009
+ */
3010
+ const searchUser = async (searchTerm, top) => _dbgWrap("SearchUser", [searchTerm, top], async function() {
3011
+ const parameters = {};
3012
+ if (searchTerm !== undefined) parameters["searchTerm"] = searchTerm;
3013
+ if (top !== undefined) parameters["top"] = top;
3014
+ return executeConnectorOperation("SearchUser", parameters);
3015
+ });
3016
+
3017
+ /**
3018
+ * Search for users (V2)
3019
+ * Retrieves the user profiles that match the search term (V2).
3020
+ */
3021
+ const searchUserV2 = async (searchTerm, top, isSearchTermRequired, skipToken) => _dbgWrap("SearchUserV2", [searchTerm, top, isSearchTermRequired, skipToken], async function() {
3022
+ const parameters = {};
3023
+ if (searchTerm !== undefined) parameters["searchTerm"] = searchTerm;
3024
+ if (top !== undefined) parameters["top"] = top;
3025
+ if (isSearchTermRequired !== undefined) parameters["isSearchTermRequired"] = isSearchTermRequired;
3026
+ if (skipToken !== undefined) parameters["skipToken"] = skipToken;
3027
+ return executeConnectorOperation("SearchUserV2", parameters);
3028
+ });
3029
+
3030
+ /**
3031
+ * Tests the connection
3032
+ * Tests the connection.
3033
+ */
3034
+ const testConnection = async () => _dbgWrap("TestConnection", [], async function() {
3035
+ return executeConnectorOperation("TestConnection");
3036
+ });
3037
+
3038
+ /**
3039
+ * Get user profile (V2)
3040
+ * Retrieves the profile of a specific user. Learn more about available fields to select: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/user#properties
3041
+ */
3042
+ const userProfile_V2 = async (id, select) => _dbgWrap("UserProfile_V2", [id, select], async function() {
3043
+ const parameters = {};
3044
+ if (id !== undefined) parameters["id"] = id;
3045
+ if (select !== undefined) parameters["$select"] = select;
3046
+ return executeConnectorOperation("UserProfile_V2", parameters);
3047
+ });
3048
+
3049
+ /**
3050
+ * Get manager (V2)
3051
+ * Retrieves the profile of the specified user's manager. Learn more about available fields to select: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/user#properties
3052
+ */
3053
+ const manager_V2 = async (id, select) => _dbgWrap("Manager_V2", [id, select], async function() {
3054
+ const parameters = {};
3055
+ if (id !== undefined) parameters["id"] = id;
3056
+ if (select !== undefined) parameters["$select"] = select;
3057
+ return executeConnectorOperation("Manager_V2", parameters);
3058
+ });
3059
+
3060
+ /**
3061
+ * Get direct reports (V2)
3062
+ * Retrieves the user profiles of the specified user's direct reports. Learn more about available fields to select: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/user#properties
3063
+ */
3064
+ const directReports_V2 = async (id, select, top) => _dbgWrap("DirectReports_V2", [id, select, top], async function() {
3065
+ const parameters = {};
3066
+ if (id !== undefined) parameters["id"] = id;
3067
+ if (select !== undefined) parameters["$select"] = select;
3068
+ if (top !== undefined) parameters["$top"] = top;
3069
+ return executeConnectorOperation("DirectReports_V2", parameters);
3070
+ });
3071
+
3072
+ /**
3073
+ * Get user photo (V2)
3074
+ * Retrieves the photo of the specified user if they have one
3075
+ */
3076
+ const userPhoto_V2 = async (id) => _dbgWrap("UserPhoto_V2", [id], async function() {
3077
+ const parameters = {};
3078
+ if (id !== undefined) parameters["id"] = id;
3079
+ return executeConnectorOperation("UserPhoto_V2", parameters);
3080
+ });
3081
+
3082
+ /**
3083
+ * Get trending documents
3084
+ * Retrieves the trending documents for a user
3085
+ */
3086
+ const trendingDocuments = async (id, filter, extractSensitivityLabel, fetchSensitivityLabelMetadata) => _dbgWrap("TrendingDocuments", [id, filter, extractSensitivityLabel, fetchSensitivityLabelMetadata], async function() {
3087
+ const parameters = {};
3088
+ if (id !== undefined) parameters["id"] = id;
3089
+ if (filter !== undefined) parameters["$filter"] = filter;
3090
+ if (extractSensitivityLabel !== undefined) parameters["extractSensitivityLabel"] = extractSensitivityLabel;
3091
+ if (fetchSensitivityLabelMetadata !== undefined) parameters["fetchSensitivityLabelMetadata"] = fetchSensitivityLabelMetadata;
3092
+ return executeConnectorOperation("TrendingDocuments", parameters);
3093
+ });
3094
+
3095
+ /**
3096
+ * Send an HTTP request
3097
+ * Construct a Microsoft Graph REST API request to invoke. These segments are supported: 1st segement: /me, /users/<userId> 2nd segment: messages, mailFolders, events, calendar, calendars, outlook, inferenceClassification. Learn more: https://docs.microsoft.com/en-us/graph/use-the-api.
3098
+ */
3099
+ const httpRequest = async (uri, method, body, contentType, customHeader1, customHeader2, customHeader3, customHeader4, customHeader5) => _dbgWrap("HttpRequest", [uri, method, body, contentType, customHeader1, customHeader2, customHeader3, customHeader4, customHeader5], async function() {
3100
+ const parameters = {};
3101
+ if (uri !== undefined) parameters["Uri"] = uri;
3102
+ if (method !== undefined) parameters["Method"] = method;
3103
+ if (body !== undefined) parameters["Body"] = body;
3104
+ if (contentType !== undefined) parameters["ContentType"] = contentType;
3105
+ if (customHeader1 !== undefined) parameters["CustomHeader1"] = customHeader1;
3106
+ if (customHeader2 !== undefined) parameters["CustomHeader2"] = customHeader2;
3107
+ if (customHeader3 !== undefined) parameters["CustomHeader3"] = customHeader3;
3108
+ if (customHeader4 !== undefined) parameters["CustomHeader4"] = customHeader4;
3109
+ if (customHeader5 !== undefined) parameters["CustomHeader5"] = customHeader5;
3110
+ return executeConnectorOperation("HttpRequest", parameters);
3111
+ });
3112
+
3113
+ const Office365UsersService = {
3114
+ UpdateMyProfile: updateMyProfile,
3115
+ MyProfile_V2: myProfile_V2,
3116
+ UpdateMyPhoto: updateMyPhoto,
3117
+ MyTrendingDocuments: myTrendingDocuments,
3118
+ RelevantPeople: relevantPeople,
3119
+ MyProfile: myProfile,
3120
+ UserProfile: userProfile,
3121
+ UserPhotoMetadata: userPhotoMetadata,
3122
+ UserPhoto: userPhoto,
3123
+ Manager: manager,
3124
+ DirectReports: directReports,
3125
+ SearchUser: searchUser,
3126
+ SearchUserV2: searchUserV2,
3127
+ TestConnection: testConnection,
3128
+ UserProfile_V2: userProfile_V2,
3129
+ Manager_V2: manager_V2,
3130
+ DirectReports_V2: directReports_V2,
3131
+ UserPhoto_V2: userPhoto_V2,
3132
+ TrendingDocuments: trendingDocuments,
3133
+ HttpRequest: httpRequest
3134
+ };
3135
+
3136
+ Object.assign(Office365UsersService, {
3137
+ callUsersOperation,
3138
+ openUsersHttpRequest,
3139
+ getMyProfile,
3140
+ getUserProfile,
3141
+ getManager,
3142
+ getDirectReports,
3143
+ getMyTrendingDocuments,
3144
+ getRelevantPeople,
3145
+ getUserPhotoMetadata,
3146
+ getUserPhoto,
3147
+ getTrendingDocuments,
3148
+ searchForUsers
3149
+ });
3150
+
3151
+ export { updateMyProfile as UpdateMyProfile, myProfile_V2 as MyProfile_V2, updateMyPhoto as UpdateMyPhoto, myTrendingDocuments as MyTrendingDocuments, relevantPeople as RelevantPeople, myProfile as MyProfile, userProfile as UserProfile, userPhotoMetadata as UserPhotoMetadata, userPhoto as UserPhoto, manager as Manager, directReports as DirectReports, searchUser as SearchUser, searchUserV2 as SearchUserV2, testConnection as TestConnection, userProfile_V2 as UserProfile_V2, manager_V2 as Manager_V2, directReports_V2 as DirectReports_V2, userPhoto_V2 as UserPhoto_V2, trendingDocuments as TrendingDocuments, httpRequest as HttpRequest };
3152
+ export { callUsersOperation, openUsersHttpRequest, getMyProfile, getUserProfile, getManager, getDirectReports, getMyTrendingDocuments, getRelevantPeople, getUserPhotoMetadata, getUserPhoto, getTrendingDocuments, searchForUsers, updateMyProfile, updateMyPhoto };
3153
+ export { Office365UsersService };
3154
+ export default Office365UsersService;