-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathcreate-new-azure-ad-users-via-a-form (1).json
More file actions
467 lines (467 loc) · 15.9 KB
/
create-new-azure-ad-users-via-a-form (1).json
File metadata and controls
467 lines (467 loc) · 15.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
{
"schema_version": 4,
"name": "Create new Azure AD users via a form",
"description": "Pull in information from a Tines Form to create a new user in Microsoft Azure Active Directory (Azure AD), and add the user to a specified security group.\n\ntags: AzureAD, Identify, UserAccess, IdentityandAccessManagement, Jira, Intermediate\nicons: 📝, microsoft, jira, \nvisibility: public",
"guid": "8b4e6564a750ef352ec0f2eca02dc382",
"slug": "create_new_azure_ad_users_via_a_form",
"exported_at": "2022-07-11T17:34:39Z",
"agents": [
{
"type": "Agents::HTTPRequestAgent",
"name": "Create user in Azure AD",
"disabled": false,
"guid": "442c6c10e8bd41dee7eedfdf8e61985a",
"options": {
"url": "https://graph.microsoft.com/v1.0/users/",
"method": "post",
"content_type": "json",
"headers": {
"Authorization": "Bearer <<CREDENTIAL.azure_ad>>"
},
"payload": {
"accountEnabled": "true",
"displayName": "<<receive_new_azure_ad_user_information.body.first_name>><<receive_new_azure_ad_user_information.body.last_name>>",
"mailNickname": "<<receive_new_azure_ad_user_information.body.email_nickname>>",
"passwordProfile": {
"forceChangePasswordNextSignIn": "true",
"password": "EnterFirstTimePassword"
},
"userPrincipalName": "<<receive_new_azure_ad_user_information.body.first_name>><<receive_new_azure_ad_user_information.body.last_name>>@emaildomain"
}
},
"reporting": {
"time_saved_value": 0,
"time_saved_unit": "minutes"
},
"monitoring": {
"monitor_all_events": false,
"monitor_failures": false,
"monitor_no_events_emitted": null
},
"schedule": null
},
{
"type": "Agents::WebhookAgent",
"name": "Receive new Azure AD user information",
"disabled": false,
"guid": "d52d4404efb8835a5afebee5918ab1a4",
"options": {
"path": "79e1ce77ee20f9a65c689220b0a2271d",
"secret": "e7c0c4acb939bcda27844306444fb1bd",
"verbs": "get,post"
},
"reporting": {
"time_saved_value": 0,
"time_saved_unit": "minutes"
},
"monitoring": {
"monitor_all_events": false,
"monitor_failures": false,
"monitor_no_events_emitted": null
}
},
{
"type": "Agents::HTTPRequestAgent",
"name": "Create issue in Jira with tables",
"disabled": false,
"guid": "b1045f9aa6ac7c031a136df359967a73",
"options": {
"url": "https://<<RESOURCE.jira_domain>>/rest/api/2/issue",
"content_type": "json",
"method": "post",
"payload": {
"fields": {
"project": {
"key": "DEMO"
},
"issuetype": {
"name": "Task"
},
"assignee": {
"name": "Unassigned"
},
"priority": {
"name": "Medium"
},
"description": "h2. Azure AD User Creation\n|*Employee Name*| <<receive_new_azure_ad_user_information.body.first_name>> <<receive_new_azure_ad_user_information.body.last_name>>|\n|*Department*| <<receive_new_azure_ad_user_information.body.ad_groups>> |\n|*Azure AD Group*| <<receive_new_azure_ad_user_information.body.ad_groups>>| \n|*Start Date*| <<DATE(\"now\", \"%Y-%m-%dT%l:%M:%S%z\")>> |\n|*Title*| Sr. Systems Engineer |\n|*Manager*| Shaun Finn |\n|*Team*| Quality Assurance\n|*Address*| 1 Test St, Testingville, MA 12345 |\n|*Location*| Boston |\n\n",
"summary": "Azure AD New User Confirmation"
}
},
"basic_auth": [
"<<RESOURCE.jira_domain>>",
"<<CREDENTIAL.jira_user>>"
]
},
"reporting": {
"time_saved_value": 0,
"time_saved_unit": "minutes"
},
"monitoring": {
"monitor_all_events": false,
"monitor_failures": false,
"monitor_no_events_emitted": null
},
"schedule": null
},
{
"type": "Agents::HTTPRequestAgent",
"name": "Create group in Azure AD",
"disabled": false,
"guid": "6912d914d4193bf4c84b4d575387bb7a",
"options": {
"url": "https://graph.microsoft.com/v1.0/groups/",
"method": "post",
"content_type": "json",
"headers": {
"Authorization": "Bearer <<CREDENTIAL.azure_ad>>"
},
"payload": {
"displayName": "<<receive_new_azure_ad_user_information.body.ad_groups>>",
"mailNickname": "<<receive_new_azure_ad_user_information.body.ad_groups>>",
"securityEnabled": "true",
"mailEnabled": "false"
}
},
"reporting": {
"time_saved_value": 0,
"time_saved_unit": "minutes"
},
"monitoring": {
"monitor_all_events": false,
"monitor_failures": false,
"monitor_no_events_emitted": null
},
"schedule": null
},
{
"type": "Agents::HTTPRequestAgent",
"name": "Add user group in Azure AD",
"disabled": false,
"guid": "04bee3964a7275284086ac1f07e12b0f",
"options": {
"url": "https://graph.microsoft.com/v1.0/groups/<<create_group_in_azure_ad.body.id>>/members/$ref",
"method": "post",
"content_type": "json",
"headers": {
"Authorization": "Bearer <<CREDENTIAL.azure_ad>>"
},
"payload": {
"@odata.id": "https://graph.microsoft.com/v1.0/directoryObjects/<<create_user_in_azure_ad.body.id>>"
}
},
"reporting": {
"time_saved_value": 0,
"time_saved_unit": "minutes"
},
"monitoring": {
"monitor_all_events": false,
"monitor_failures": false,
"monitor_no_events_emitted": null
},
"schedule": null
},
{
"type": "Agents::HTTPRequestAgent",
"name": "Send card to user",
"disabled": false,
"guid": "389f810f7c3143962a9fc0592c849b86",
"options": {
"url": "https://<<RESOURCE.microsoft_serviceurl>>/v3/conversations/<<start_conversation_with_user.body.id>>/activities",
"content_type": "json",
"method": "post",
"payload": {
"type": "message",
"from": {
"id": "<<RESOURCE.microsoft_teams_bot_id>>",
"name": "Tines Bot"
},
"recipient": {
"id": "<<get_member_information.id>>"
},
"attachments": [
{
"contentType": "application/vnd.microsoft.card.thumbnail",
"content": {
"title": "New Azure AD User Creation",
"subtitle": "A new user task has just been created in Jira",
"text": "A new user has been created for your team in Azure AD. To view the new user information please click the button below",
"images": [
{
"url": "https://logo.clearbit.com/tines.com",
"alt": "Tines"
}
],
"buttons": [
{
"type": "openUrl",
"title": "View Jira Task",
"value": "https://tinesio.atlassian.net/browse/<<create_issue_in_jira_with_tables.body.key>>"
}
]
}
}
]
},
"headers": {
"Authorization": "Bearer <<CREDENTIAL.msteams>>"
}
},
"reporting": {
"time_saved_value": 0,
"time_saved_unit": "minutes"
},
"monitoring": {
"monitor_all_events": false,
"monitor_failures": false,
"monitor_no_events_emitted": null
},
"schedule": null
},
{
"type": "Agents::HTTPRequestAgent",
"name": "Start conversation with User",
"disabled": false,
"guid": "596f3d57ec95e580d8064d4ee9b8558d",
"options": {
"url": "https://<<RESOURCE.microsoft_serviceurl>>/v3/conversations/",
"content_type": "json",
"method": "post",
"payload": {
"bot": {
"id": "<<RESOURCE.teams_bot_id>>",
"name": "Tines Bot"
},
"members": [
{
"id": "<<get_member_information.id>>"
}
],
"channelData": {
"tenant": {
"id": "<<get_member_information.tenantID>>"
}
}
},
"headers": {
"Authorization": "Bearer <<CREDENTIAL.botbot>>"
}
},
"reporting": {
"time_saved_value": 0,
"time_saved_unit": "minutes"
},
"monitoring": {
"monitor_all_events": false,
"monitor_failures": false,
"monitor_no_events_emitted": null
},
"schedule": null
},
{
"type": "Agents::HTTPRequestAgent",
"name": "Fetch Team Roster",
"disabled": false,
"guid": "bf778f10420c67081d3d511b2780d712",
"options": {
"url": "https://<<RESOURCE.microsoft_serviceurl>>/v3/conversations/<<RESOURCE.teams_tines_team_id>>/members",
"content_type": "json",
"method": "get",
"headers": {
"Authorization": "Bearer <<CREDENTIAL.msteams>>"
}
},
"reporting": {
"time_saved_value": 0,
"time_saved_unit": "minutes"
},
"monitoring": {
"monitor_all_events": false,
"monitor_failures": false,
"monitor_no_events_emitted": null
},
"schedule": null
},
{
"type": "Agents::EventTransformationAgent",
"name": "Get member information",
"disabled": false,
"guid": "fd43f2421c2d96cbacb82e64559689b5",
"options": {
"mode": "message_only",
"loop": false,
"payload": {
"id": "<<WHERE(fetch_team_roster.body, \"name\", users_name) |> GET(%, \"id\")>>",
"tenantID": "<<WHERE(fetch_team_roster.body, \"name\", user_name) |> GET(%, \"tenantId\")>>"
}
},
"reporting": {
"time_saved_value": 0,
"time_saved_unit": "minutes"
},
"monitoring": {
"monitor_all_events": false,
"monitor_failures": false,
"monitor_no_events_emitted": null
},
"schedule": null
},
{
"type": "Agents::EventTransformationAgent",
"name": "Wait 5 seconds",
"disabled": false,
"guid": "5a2b629f5e9778e2679820496d3d7d25",
"options": {
"mode": "delay",
"seconds": "5"
},
"reporting": {
"time_saved_value": 0,
"time_saved_unit": "minutes"
},
"monitoring": {
"monitor_all_events": false,
"monitor_failures": false,
"monitor_no_events_emitted": null
},
"schedule": null
}
],
"diagram_notes": [
{
"content": "https://image-uploads.tines.com/Microsoft.png\n\n\nThis Story receives a form with information about a new user to create in Azure Active Directory. \n\nThe Story will then create the new user, and add the user to specified groups. Once completed the users manager can be notified via MS Teams of the user creation. \n\n**Resources**\n`jira_domain` - FQDN for Jira instance\n`jira_user` - Username with rights to create/update issues\n\n\n**Credentials & Resources**\n`jira_credentials` - Password for `jira_user`\n`azure_ad` - Azure AD Credential\n`msteams` - MS Teams Credential",
"position": [
45.0,
135.0
],
"guid": "8301453c5bb2482bfad403faa4a4411c",
"width": null
},
{
"content": "# Azure App Creation\n\n1. Create a new App Registration in https://portal.azure.com\n2. Enter a name, set the Account Type to be `Single tenant`.\n3. Add the 'Redirect URL'. This can be found when creating an OAuth Credential in Tines. It's in the format of `https://<tinesdomain>/oauth2/callback`\n4. Hit 'Register' to create the app\n5. Select 'API Permissions' from the left bar, and choose 'Add Permission'.\n6. Select `Microsoft Graph` and `Application Permissions`.\n7. Search for and add `Directory.ReadWrite.All` & `User.ReadWrite.All` & `Group.ReadWrite.All` & `GroupMember.ReadWrite.All` . This permission is needed to create a user and add them to a group in Azure AD.\n8. Save these permissions, and select `Grant Admin Consent for <domain>`. \n9. Select `Certificates and Secrets` from the left bar, and select `New client secret`. Select the expiration time (max 24 months). The token will need to be regenerated after this time. Make a note of this value.\n10. Make a note of the Application ID found in 'Overview' on the left bar. \n",
"position": [
825.0,
150.0
],
"guid": "dbdc9531ca584cbec0026e45862fb0fe",
"width": null
},
{
"content": "# OAuth Credential\n\nCreate a new Credential in Tines with the following values:\n\n1. Type `OAuth 2.0`\n2. Client ID: `Application ID` from Azure app registration\n3. Client Secret: ` Client Secret` from Azure app registration\n4. Scope: `https://graph.microsoft.com/.default`\n5. Grant Type: `Client credentials`\n6. OAuth URL: `https://login.microsoftonline.com/<O365_TENANT_ID>/oauth2/v2.0/authorize`\n7. OAuth token URL: `https://login.microsoftonline.com/<O365_TENANT_ID>/oauth2/v2.0/token`",
"position": [
1140.0,
150.0
],
"guid": "f192106955f94425539eb10216462c94",
"width": null
}
],
"links": [
{
"source": 0,
"receiver": 3
},
{
"source": 1,
"receiver": 0
},
{
"source": 2,
"receiver": 7
},
{
"source": 3,
"receiver": 9
},
{
"source": 4,
"receiver": 2
},
{
"source": 6,
"receiver": 5
},
{
"source": 7,
"receiver": 8
},
{
"source": 8,
"receiver": 6
},
{
"source": 9,
"receiver": 4
}
],
"diagram_layout": "{\"442c6c10e8bd41dee7eedfdf8e61985a\":[420,240],\"d52d4404efb8835a5afebee5918ab1a4\":[420,150],\"b1045f9aa6ac7c031a136df359967a73\":[420,555],\"6912d914d4193bf4c84b4d575387bb7a\":[420,330],\"04bee3964a7275284086ac1f07e12b0f\":[420,480],\"389f810f7c3143962a9fc0592c849b86\":[420,900],\"596f3d57ec95e580d8064d4ee9b8558d\":[420,795],\"bf778f10420c67081d3d511b2780d712\":[420,645],\"fd43f2421c2d96cbacb82e64559689b5\":[420,720],\"5a2b629f5e9778e2679820496d3d7d25\":[420,405]}",
"send_to_story_enabled": false,
"entry_agent_guid": null,
"exit_agent_guids": [],
"exit_agent_guid": null,
"send_to_stories": [],
"form": {
"name": "Create new Azure AD users via a form Form",
"description": "",
"fields": [
{
"name": "First Name",
"description": "",
"required": false,
"type": "SHORT_TEXT",
"multi_select": false,
"options": [
"Option 1",
"Option 2"
],
"ranking": 0,
"max_characters": null,
"tenant_id": 8687
},
{
"name": "Last Name",
"description": "",
"required": false,
"type": "SHORT_TEXT",
"multi_select": false,
"options": [
"Option 1",
"Option 2"
],
"ranking": 1073741824,
"max_characters": null,
"tenant_id": 8687
},
{
"name": "Email Nickname",
"description": "",
"required": false,
"type": "SHORT_TEXT",
"multi_select": false,
"options": [
"Option 1",
"Option 2"
],
"ranking": 1610612736,
"max_characters": null,
"tenant_id": 8687
},
{
"name": "AD Groups",
"description": "",
"required": false,
"type": "OPTION",
"multi_select": true,
"options": [
"IT Team",
"SecOps"
],
"ranking": 1879048192,
"max_characters": null,
"tenant_id": 8687
}
],
"visibility": "tenant",
"agent_guid": "d52d4404efb8835a5afebee5918ab1a4",
"success_message": "Thank you for your submission"
}
}