Workflow External Trigger OAuth 500 error

I’m trying to create an OAuth client ID and secret for an workflow external trigger per this API doc: Generate External Trigger OAuth Client

I’m getting back a 500 internal server error though indicating that there’s an invalid character somewhere in the call. Has anyone seen this before?

(I’m running the call in postman. Below is the curl code snippet and resulting error response)

curl --location --request POST ‘https://tenant.api.identitynow-demo.com/beta/workflows/0b91ffc2-4705-4850-818c-6ff0dce45e91/external/oauth-clients’ \
–header ‘Authorization: Bearer redacted’

{
    "detailCode": "Internal Server Error",
    "trackingId": "5a66e956fbfa4cfea2a43299d325d94f",
    "messages": [
        {
            "locale": "en-US",
            "localeOrigin": "DEFAULT",
            "text": "invalid character '\\n' in string literal"
        }
    ]
}

Hi Adam,

Can you please check and make sure that the workflow that you are calling is working fine while testing it.?

I am doubting if it is something wrong with the actual WF.

I can test the workflow in the sailpoint UI but it has a “loop” at the end which is an HTTP request to re-trigger the same workflow.

My personal admin PAT gets a 401 unauthorized when trying to fire the external trigger for the workflow so I assumed we had to use the originally mentioned call to make a client ID/secret in order to execute the external trigger. (Yes, my PAT has the scope to execute workflows)

I would try replacing the loop part with an end node to see if that works in generating the client secret.

If that works, then add the loop part back and see how the WF behaves.

Hi Adam,

You can try the following API instead of the curl command in postman.

POST https://sailpoint.api.identitynow.com/beta/workflows/:id/external/oauth-clients

Pass the Workflow ID and this would generate Client ID,Secret and URL

1 Like

Hi Anagha, if you look at my original message, that API call is listed as what I was trying to do. I get back a 500 error stating there’s an invalid character in string literal.

    "detailCode": "Internal Server Error",
    "trackingId": "5a66e956fbfa4cfea2a43299d325d94f",
    "messages": [
        {
            "locale": "en-US",
            "localeOrigin": "DEFAULT",
            "text": "invalid character '\\n' in string literal"
        }
    ]
}

@colin_mckibben I’m going to tag you in if you don’t mind. I’m still working on your reassignment workflows and this is what I’m running into now trying to get the external trigger working for the “loop” part.

You can generate the client ID and client secret for an external trigger directly in the workflows UI. Just click on the “External Trigger” step and there is a button to create new access token.

The client ID and secret will be provided on the next page.

:man_facepalming:

Ok, I tried it that way and I’m still getting the same error message.

image

@colin_mckibben I figured it out. :man_facepalming:

The description for the external trigger is causing it to error when generating the token.

Must use the following payload when invoking this trigger:
{
  "previousOwnerId": "{identity ID}",
  "newOwnerId": "{identity ID}"
}
2 Likes

Oh no! I will attempt to reproduce this and then open a bug report to the engineering team.

2 Likes

@WyssAJ01 I was able to reproduce this issue and I submitted a bug report for it. PLTWRKFLW-3915 for my record.

1 Like

Cool thank you Colin! Should we put a note on your blog post about the reassignment workflows so people know they might need to clear or edit the description for the external triggers?

1 Like

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