# Workflow for failed prov

**URL:** <https://developer.sailpoint.com/discuss/t/workflow-for-failed-prov/125803>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, identity-security-cloud\
**Created:** [May 7, 2025, 5:16pm UTC](https://developer.sailpoint.com/discuss/t/workflow-for-failed-prov/125803 "2025-05-07T17:16:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepanshu07](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@Deepanshu07](https://developer.sailpoint.com/discuss/u/Deepanshu07)\
**Post date:** [May 7, 2025, 5:16pm UTC](https://developer.sailpoint.com/discuss/t/workflow-for-failed-prov/125803/1 "2025-05-07T17:16:53Z")

</div>

Hi Team,

I have a requirement where i need to built a workflow which whenever the prov fails for the user sends out an email to the app team dl.

also in the email content can we put the prov error?

---

<div class="post-metadata">

**Author:** ![baoussounda](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/baoussounda/32/13095_2.png) [@baoussounda](https://developer.sailpoint.com/discuss/u/baoussounda)\
**Post date:** [May 7, 2025, 5:46pm UTC](https://developer.sailpoint.com/discuss/t/workflow-for-failed-prov/125803/2 "2025-05-07T17:46:02Z")

</div>

> [@Deepanshu07](#):
>
> I have a requirement where i need to built a workflow which whenever the prov fails for the user sends out an email to the app team dl.

You can use the trigger Provisionning Completed [Triggers - SailPoint Identity Services](https://documentation.sailpoint.com/saas/help/workflows/workflow-triggers.html#provisioning-completed)

It look like this :

```auto
{
    "trackingNumber":"4b4d982dddff4267ab12f0f1e72b5a6d",
    "action":"IdentityRefresh",
    "requester":{
        "id":"2c91808b6ef1d43e016efba0ce470906",
        "name":"Adam Admin",
        "type":"IDENTITY"
    },
    "recipient":{
        "id":"2c91808b6ef1d43e016efba0ce470909",
        "name":"Ed Engineer",
        "type":"IDENTITY"
    },
    "errors":[
        "General Error",
        "Connector AD Failed"
    ],
    "warnings":[
        "Notification Skipped due to invalid email"
    ],
    "sources":"Corp AD, Corp LDAP, Corp Salesforce",
    "accountRequests":[
        {
            "source":{
                "id":"4e4d982dddff4267ab12f0f1e72b5a6d",
                "name":"Corporate Active Directory",
                "type":"SOURCE"
            },
            "accountId":"CN=example,ou=sample,ou=test,dc=ex,dc=com",
            "accountOperation":"Modify",
            "provisioningResult":"committed",
            "provisioningTarget":"Corp AD",
            "ticketId":"72619262",
            "attributeRequests":[
                {
                    "operation":"Add",
                    "attributeName":"memberOf",
                    "attributeValue":"CN=admin,DC=training,DC=com"
                }
            ]
        }
    ]
}

```

As you can see we have error arrays and provisioningResult you can combine these to check if you are error or not then you can send and email

And also to add error message you can define template contexte variable as described here [Using IdentityNow Workflows to Send a List of Uncorrelated Accounts After Aggregation - Content / Community Blog - SailPoint Developer Community](https://developer.sailpoint.com/discuss/t/using-identitynow-workflows-to-send-a-list-of-uncorrelated-accounts-after-aggregation/24010/1)

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/d/c/dc95cd7d513002dd053b459d49b5c3187af262fb.png)

---

<div class="post-metadata">

**Author:** ![margocbain](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/margocbain/32/17314_2.png) [@margocbain](https://developer.sailpoint.com/discuss/u/margocbain)\
**Post date:** [May 8, 2025, 2:53pm UTC](https://developer.sailpoint.com/discuss/t/workflow-for-failed-prov/125803/3 "2025-05-08T14:53:43Z")

</div>

Hi Deepanshu,  
There is a pre-built workflow for this in the colab [colab-workflows/workflows/retry-failed-workflows at main · sailpoint-oss/colab-workflows · GitHub](https://github.com/sailpoint-oss/colab-workflows/tree/main/workflows/retry-failed-workflows) that I would recommend you use as a starting point.

Thanks,  
Margo

---

<div class="post-metadata">

**Author:** ![Deepanshu07](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@Deepanshu07](https://developer.sailpoint.com/discuss/u/Deepanshu07)\
**Post date:** [May 9, 2025, 12:06pm UTC](https://developer.sailpoint.com/discuss/t/workflow-for-failed-prov/125803/4 "2025-05-09T12:06:13Z")

</div>

Provisioning completed will work even if provisioning fails ?

---

<div class="post-metadata">

**Author:** ![baoussounda](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/baoussounda/32/13095_2.png) [@baoussounda](https://developer.sailpoint.com/discuss/u/baoussounda)\
**Post date:** [May 9, 2025, 12:17pm UTC](https://developer.sailpoint.com/discuss/t/workflow-for-failed-prov/125803/5 "2025-05-09T12:17:17Z")

</div>

I think so but you have to test it.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [July 8, 2025, 12:17pm UTC](https://developer.sailpoint.com/discuss/t/workflow-for-failed-prov/125803/6 "2025-07-08T12:17:31Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
