Approvals
Approvals offer flexible integration options. You can choose to receive notifications when an approval stage changes or specify the approvers for each approval step before starting an approval process.
State changes
This webhook triggers whenever the state of an approval request changes, including:
- Approval request creation
- Approval request approval
- Approval request rejection
HTTP Request
POST YourApiUrl
Content-Type: application/json
- Creation
- Approval
- Rejection
{
"requestId": "d12773f8-6ea1-42be-9be4-3cd58bac3b63",
"title": "Group sample",
"reason": "Is there no reason?",
"requestorId": "d3f0fe0f-ad34-4eb2-af61-953ea3a76031",
"participants": [
"d3f0fe0f-ad34-4eb2-af61-953ea3a76031"
],
"stage": 0,
"totalStages": 2,
"templateId": "8884dca2-6f58-4175-81a2-3504f6ee616d",
"tenantId": "1840b34e-6fe7-4a56-9ad3-0b7b58c49dc7"
}
{
"requestId": "6eb6d273-a0c3-409b-bb48-58b44cbd7e77",
"responseId": "211de222-5a92-4847-8b1e-21a297e458a0",
"requestorId": "d3f0fe0f-ad34-4eb2-af61-953ea3a76031",
"approverId": "d3f0fe0f-ad34-4eb2-af61-953ea3a76031",
"outcome": 3,
"answer": "Approved by me",
"tenantId": "1840b34e-6fe7-4a56-9ad3-0b7b58c49dc7"
}
{
"requestId": "6eb6d273-a0c3-409b-bb48-58b44cbd7e77",
"responseId": "5aae4f98-ed09-4878-b479-6f906bbc27fc",
"requestorId": "d3f0fe0f-ad34-4eb2-af61-953ea3a76031",
"approverId": "d3f0fe0f-ad34-4eb2-af61-953ea3a76031",
"answer": "had to reject this",
"outcome": 4,
"tenantId": "1840b34e-6fe7-4a56-9ad3-0b7b58c49dc7"
}
Response
A status 200 OK is expected with no body.
Assign approvers to an approval stage
Approval workflows often require specific approvers. In such cases, approver webhooks prove invaluable. When an approval request is initiated, the webhook calls a designated endpoint. The returned user IDs are then verified as collaborators and assigned as the approvers for that particular approval stage.
The payload content varies depending on the specific resource being requested. This ensures that the endpoint receives all necessary information to correctly determine the approvers for each case.
HTTP Request
POST YourApiUrl
Content-Type: application/json
- Guest
- Group/Team
- Communication or SharePoint site
- Guest addition
{
"requestId": "c131c319-f0e4-4a02-ad68-c7bcff69ece9",
"title": "guest@toinvite.com",
"reason": "This is the reason again",
"requestorId": "d3f0fe0f-ad34-4eb2-af61-953ea3a76031",
"payload": "{\"userRequest\":{\"secondaryOwner\":{\"id\":\"788da9bf-0762-4dd6-a5db-346430ad7b1a\",\"userType\":\"Member\",\"userPrincipalName\":\"AlexW@sampledomain.com\",\"jobTitle\":\"Marketing Assistant\",\"givenName\":\"Alex\",\"displayName\":\"Alex Wilber\",\"department\":\"Marketing\",\"createdDateTime\":\"2019-09-23T10:20:49+00:00\",\"country\":\"United States\",\"city\":\"San Diego\",\"businessPhones\":[\"\\u002B1 858 555 0110\"],\"accountEnabled\":true,\"mail\":\"AlexW@sampledomain.com\",\"surname\":\"Wilber\",\"streetAddress\":\"9256 Towne Center Dr., Suite 400\",\"state\":\"CA\",\"preferredLanguage\":\"en-US\",\"postalCode\":\"92121\",\"officeLocation\":\"131/1104\",\"policyExtension\":{\"pId\":\"5a6d4c46-883a-4b08-b17e-1f5dea63049f\",\"arStCh\":\"2024-07-21T21:59:59+00:00\",\"arSt\":\"escalate\",\"arSta\":\"incompliant\",\"arCh\":\"2024-07-09T21:59:59+00:00\"},\"easylife365_user\":{\"policyId\":\"5a6d4c46-883a-4b08-b17e-1f5dea63049f\",\"resourceType\":\"OneDrive\",\"isCompliant\":false},\"onPremisesExtensionAttributes\":{}},\"mail\":\"guest@toinvite.com\",\"templateId\":\"f647cbc3-cd9e-47ed-b517-93fa29e7b292\",\"requestor\":{\"id\":\"d3f0fe0f-ad34-4eb2-af61-953ea3a76031\",\"userType\":\"Member\",\"userPrincipalName\":\"pbe@sampledomain.com\",\"givenName\":\"Patrick\",\"displayName\":\"Patrick Bertolla\",\"createdDateTime\":\"2021-06-14T04:53:35+00:00\",\"companyName\":\"EasyLife\",\"businessPhones\":[],\"accountEnabled\":true,\"mail\":\"pbe@sampledomain.com\",\"surname\":\"Bertolla\",\"preferredLanguage\":\"de-DE\",\"officeLocation\":\"Somewhere\",\"policyExtension\":{\"pId\":\"5a6d4c46-883a-4b08-b17e-1f5dea63049f\",\"arStCh\":\"2024-09-27T23:59:59+00:00\",\"arSt\":\"escalate\",\"arSta\":\"incompliant\",\"arCh\":\"2024-09-24T23:59:59+00:00\",\"arFeDa\":\"2024-09-24T09:00:45.6167403+00:00\"},\"easylife365_user\":{\"policyId\":\"5a6d4c46-883a-4b08-b17e-1f5dea63049f\",\"resourceType\":\"OneDrive\",\"isCompliant\":false},\"onPremisesExtensionAttributes\":{}},\"metadata\":{\"tId\":\"f647cbc3-cd9e-47ed-b517-93fa29e7b292\"},\"addToGroups\":[\"e808e4d6-c6e1-4686-a0d3-aa521b48b14d\"],\"reason\":\"This is the reason again\",\"sendInvitationMail\":true},\"requestId\":\"4ad8192d-0135-4ebc-8dbc-06478e321eba\",\"tenantId\":\"1840b34e-6fe7-4a56-9ad3-0b7b58c49dc7\",\"isInvitation\":false}",
"participants": [
"d3f0fe0f-ad34-4eb2-af61-953ea3a76031"
],
"stage": 0,
"totalStages": 1,
"templateId": "3531ed85-aa80-44a4-a5a9-41c713a76ffa",
"tenantId": "1840b34e-6fe7-4a56-9ad3-0b7b58c49dc7",
"productId": 0,
"IsTenantSelected": true,
"IsRequestSelected": true
}
{
"requestId": "dce1f4dd-d42a-42c5-9551-cb6e32153ff3",
"title": "Bott",
"reason": "Just a simple reason ",
"requestorId": "d3f0fe0f-ad34-4eb2-af61-953ea3a76031",
"payload": "{\"displayName\":\"Bott\",\"input\":\"Bott\",\"tenantId\":\"1840b34e-6fe7-4a56-9ad3-0b7b58c49dc7\",\"description\":\"Bott\",\"alias\":\"\",\"memberShipType\":1,\"requestor\":{\"id\":\"d3f0fe0f-ad34-4eb2-af61-953ea3a76031\",\"userType\":\"Member\",\"userPrincipalName\":\"pbe@sampledomain.onmicrosoft.com\",\"givenName\":\"Patrick\",\"displayName\":\"Patrick Bertolla\",\"createdDateTime\":\"2021-06-14T04:53:35+00:00\",\"companyName\":\"EasyLife\",\"businessPhones\":[],\"accountEnabled\":true,\"mail\":\"pbe@sampledomain.onmicrosoft.com\",\"surname\":\"Bertolla\",\"preferredLanguage\":\"de-DE\",\"officeLocation\":\"Cozumel\",\"easylife365_user\":{\"policyId\":\"5a6d4c46-883a-4b08-b17e-1f5dea63049f\",\"resourceType\":\"OneDrive\",\"isCompliant\":false},\"onPremisesExtensionAttributes\":{}},\"owners\":[\"d3f0fe0f-ad34-4eb2-af61-953ea3a76031\",\"97060bff-09f5-4b7f-a799-ec8a659e732f\"],\"members\":[\"2294242e-fa90-44fb-beab-8d2bdca19984\"],\"metadata\":{\"tId\":\"7f7b0dfc-c82c-43f2-bc1c-d654096994da\"},\"templateId\":\"7f7b0dfc-c82c-43f2-bc1c-d654096994da\",\"requestId\":\"fb492659-4db8-4109-8560-8621bb0639b6\",\"reason\":\"Just a simple reason \"}",
"participants": [
"d3f0fe0f-ad34-4eb2-af61-953ea3a76031"
],
"stage": 0,
"totalStages": 1,
"templateId": "3531ed85-aa80-44a4-a5a9-41c713a76ffa",
"tenantId": "1840b34e-6fe7-4a56-9ad3-0b7b58c49dc7",
"productId": 0,
"IsTenantSelected": true,
"IsRequestSelected": true
}
{
"requestId": "6a6fed03-0bf1-4b96-9119-4516aefde86d",
"title": "Sample for sharepoint",
"reason": "Again the reason",
"requestorId": "d3f0fe0f-ad34-4eb2-af61-953ea3a76031",
"payload": "{\"displayName\":\"Sample for sharepoint\",\"input\":\"Sample for sharepoint\",\"tenantId\":\"1840b34e-6fe7-4a56-9ad3-0b7b58c49dc7\",\"description\":\"Sample for sharepoint\",\"alias\":\"\",\"requestor\":{\"id\":\"d3f0fe0f-ad34-4eb2-af61-953ea3a76031\",\"userType\":\"Member\",\"userPrincipalName\":\"pbe@sampledomain.onmicrosoft.com\",\"givenName\":\"Patrick\",\"displayName\":\"Patrick Bertolla\",\"createdDateTime\":\"2021-06-14T04:53:35+00:00\",\"companyName\":\"EasyLife\",\"businessPhones\":[],\"accountEnabled\":true,\"mail\":\"pbe@sampledomain.onmicrosoft.com\",\"surname\":\"Bertolla\",\"preferredLanguage\":\"de-DE\",\"officeLocation\":\"Cozumel\",\"easylife365_user\":{\"policyId\":\"5a6d4c46-883a-4b08-b17e-1f5dea63049f\",\"resourceType\":\"OneDrive\",\"isCompliant\":false},\"onPremisesExtensionAttributes\":{}},\"owners\":[\"d3f0fe0f-ad34-4eb2-af61-953ea3a76031\",\"2294242e-fa90-44fb-beab-8d2bdca19984\"],\"metadata\":{\"tId\":\"e3c46c6f-65a0-4d68-83a8-314660132f84\",\"el-text-98233\":\"Project team 0\"},\"templateId\":\"e3c46c6f-65a0-4d68-83a8-314660132f84\",\"requestId\":\"217b4cd0-fd3d-4efd-818e-4067525e6302\",\"sharePointSettings\":{\"isEnabled\":true,\"isEngineEnabled\":false,\"securityGroupPrefix\":\"SG_EL_SPO_\"},\"reason\":\"Again the reason\"}",
"participants": [
"d3f0fe0f-ad34-4eb2-af61-953ea3a76031"
],
"stage": 0,
"totalStages": 1,
"templateId": "3531ed85-aa80-44a4-a5a9-41c713a76ffa",
"tenantId": "1840b34e-6fe7-4a56-9ad3-0b7b58c49dc7",
"productId": 0,
"IsTenantSelected": true,
"IsRequestSelected": true
}
{
"requestId": "5b2f944a-98bc-44c1-8ae5-c40998a873fa",
"title": "Kuugigi@adsfasdfasf.comdsadfadsfasfagr",
"reason": "This is the reason",
"requestorId": "d3f0fe0f-ad34-4eb2-af61-953ea3a76031",
"payload": "{\"requestId\":\"b06aaa58-2962-4159-a9de-d021ed6ba79e\",\"tenantId\":\"1840b34e-6fe7-4a56-9ad3-0b7b58c49dc7\",\"userRequest\":{\"requestorId\":\"d3f0fe0f-ad34-4eb2-af61-953ea3a76031\",\"groups\":[\"955ebbc7-1c46-405c-a277-1a2c1a33f616\"],\"userId\":\"8c4fa18d-9d7b-42ad-9bb6-bb88b01b7955\",\"templateId\":\"768b14f6-5820-446b-b1bb-96ba8af98d87\",\"creationSettings\":{\"excludeTemplates\":[\"b5e01f11-71f7-4066-ada5-8e61a2204bab\",\"c4a34acd-e6b7-462b-a3c8-60acd4f89e57\"],\"ndaSettings\":{\"isNDARequired\":false}},\"reason\":\"This is the reason\"}}",
"participants": [
"d3f0fe0f-ad34-4eb2-af61-953ea3a76031"
],
"stage": 0,
"totalStages": 1,
"templateId": "3531ed85-aa80-44a4-a5a9-41c713a76ffa",
"tenantId": "1840b34e-6fe7-4a56-9ad3-0b7b58c49dc7",
"productId": 0,
"IsTenantSelected": true,
"IsRequestSelected": true
}
The property payload
is an escaped JSON string
Response
EasyLife expects a HTTP 200 OK with an array of user Entra ID object IDs in the following format:
[
"974d3b91-22dd-4851-9987-10ebbfb08737",
"bb87b3cf-9d8e-4dfc-b9e6-aba0f9b4acb7"
]
IDs that cannot be located in your Entra ID will be skipped. If no users can be identified, the approval workflow will terminate, and the requestor will be notified of the failure.