Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

REST- Form Data Authentication

vivekrajan1
New Contributor III
New Contributor III

Hi Team,

I need to integrate an application through REST protocol, But the application uses Form Data Authentication.

Like in Screenshot below

vivekrajan1_4-1726675126593.png

Once I hit this, it will give a Auth_token and I need to use the Auth_Token in the URL to fetch the User. Screenshot below. AuthToken will expire at some point in time.

 

vivekrajan1_3-1726674895079.png

How do I create a connection JSON for this? could you please provide a sample

 

6 REPLIES 6

rushikeshvartak
All-Star
All-Star
  • Add params in httpParams

 

{
  "authentications": {
    "userAuth": {
      "authType": "oauth2",
      "url": "https://<domain name>/api/v18.2/auth",
      "httpMethod": "POST",
      "httpParams": {
        "login": "<Username>",
        "password": "<Password>"
      },
      "httpHeaders": {
        "contentType": "application/x-www-form-urlencoded"
      },
      "httpContentType": "application/x-www-form-urlencoded",
      "expiryError": "ExpiredAuthenticationToken",
      "authError": [
        "InvalidAuthenticationToken",
        "AuthenticationFailed",
        "FAILURE",
        "INVALID_SESSION_ID"
      ],
      "timeOutError": "Read timed out",
      "errorPath": "errors.type",
      "maxRefreshTryCount": 5,
      "tokenResponsePath": "sessionId",
      "tokenType": "Bearer",
      "accessToken": "<access token>"
    }
  }
}

 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

NM
Honored Contributor II
Honored Contributor II

Hi @vivekrajan1 just the developer guide you can set content type as form

vivekrajan1
New Contributor III
New Contributor III

Hi @rushikeshvartak - Thank you for the sample ConnectionJson. 

How do I pass the Auth_token(accessToken) in the 'ImportAccountEntJSON' as a parameter in the URL.

For Ex:

URL: https://example.com/xxx/yyy/users?auth_token=(pass AuthToken here)

below is the CURL command exported from postman.

vivekrajan1_0-1726686692493.png

 

${access_token}


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Im facing problem regarding Auth_Token, could you please help me identify the issue.

In ImportAccountEntJSON -> URL section, I am trying to pass auth_token but EIC always passes  hardcoded dummy value "abc123" in ${access_token}, like below

Actual URL - "url": "https://xxxx/xxxx/xxxx/xxxx/xxxxx?auth_token=${access_token}&per_page=2&page=4"
EIC pass dummy value - "url": "https://xxxx/xxxx/xxxx/xxxx/xxxxx?auth_token=abc123&per_page=2&page=4",

In Logs, im seeing, pullObjectsByRest - responseStatusCode ::401

in ConnectionJSON I tried below steps, but only 'Step 3' worked,

i.  This approach did not work
"tokenResponsePath": "auth_token",
"tokenType": "auth_token",
"accessToken": "abc123"

2. This approach did not work
"tokenResponsePath": "auth_token",
"tokenType": "",
"accessToken": "abc123"

3. This approach worked
"tokenResponsePath": "auth_token",
"tokenType": "",
"accessToken": "Copy Pasted actual AccessToken"

Could you please help me identify why EIC is not passing Auth_token?

I attached Connection Json and ImportAccountEntJson and screenshot from postman that generates auth_token

vivekrajan1_1-1726746928621.png

Add test connection param in connection json and validate also confirm id hardcoded token works


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.