Workforce Integration callback not being called

SwiftShift Admin (Oren Ariel) 1 Reputation point
2022-01-28T18:53:52.02+00:00

We're trying to receive a callback whenever a shift is created or a shift swap request is being issued.

We initiate the WFI create request with Graph API:

POST https://graph.microsoft.com/v1.0/teamwork/workforceintegration

headers:

{
    "Authorization": "Bearer <TOKEN>",
    "Accept": "application/json",
    "Content-Type": "application/json",
    "MS-APP-ACTS-AS": "<USER ID>",
    "Prefer": "include-unknown-enum-members"
}

body:

{
    "displayName": "swiftshift",
    "apiVersion": 1,
    "isActive": true,
    "encryption": {
        "protocol": "sharedSecret",
        "secret": "<SECRET>"
    },
    "url": "https://<HOSTNAME>.ngrok.io/workforceintegration_wh",
    "supports": "Shift,SwapRequest",
    "supportedEntities": "Shift,SwapRequest"
}

Immediately following the call we get a POST on /workforceintegration_wh/v1/connect for which I return 200 Ok.

If we call GET https://graph.microsoft.com/v1.0/teamwork/workforceIntegrations it seems like everything is installed ok and the WFI is listed:

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#teamwork/workforceIntegrations",
    "@odata.count": 1,
    "value": [
        {
            "@odata.etag": "\"1900bff9-0000-0400-0000-61f42e880000\"",
            "id": "WFI_1ec4560e-c8a8-4ff3-b7dc-9fe0a39dbd13",
            "createdDateTime": "2022-01-28T17:57:28.576Z",
            "lastModifiedDateTime": "2022-01-28T17:57:28.576Z",
            "displayName": "swiftshift",
            "url": "https://<HOSTNAME>.ngrok.io/workforceintegration_wh",
            "apiVersion": 1,
            "isActive": true,
            "supportedEntities": "shift,swapRequest",
            "lastModifiedBy": {
                "application": null,
                "device": null,
                "user": {
                    "id": "<USER ID>",
                    "displayName": "<USER DISPLAY NAME>",
                    "userIdentityType": "aadUser"
                }
            },
            "encryption": {
                "protocol": "sharedSecret",
                "secret": null
            }
        }
    ]
}

However, no callback is received on the endpoint https://<HOSTNAME>.ngrok.io/workforceintegration_wh for any subsequent new shift or shift swap request in any team shifts schedule.

Appreciate your help!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,580 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.