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

[Access Request API]: Add a user to an ENTREPRISE role through API using createrequest

KhaoulaD
New Contributor III
New Contributor III

Hello,

 

We want to add users to roles through API calls using "createrequest" with the following payload and it worked only if the role is of "APPLICATION" type but in our case we need to add user to entreprise roles not Application type:

{
    "requesttype":"ADD",
    "roletype":"ENTERPRISE",
    "username":"requestee_username",
    "endpoint":"endpoint_name,
    "securitysystem":"securitysystem_name",
    "requestcomments":"comment",
    "requestor":"requestor_username",
    "roles":[
        {
            "rolename":"role_name",
            "startdate":"10-01-2980"
        }
    ]
}
 
We have followed the latest Saviynt API documentation using this payload for ENTREPRISE roles:
{
    "requesttype":"ADD",
    "roletype":"ENTERPRISE",
    "username":"requestee_username",
    "requestcomments":"comment",
    "requestor":"requestor_username",
    "roles":[
        {
            "rolename":"role_name",
            "startdate":"10-01-2980"
        }
    ]
}
 
But it crashed with 401 error. 
The permisssions and all confugurations are set-up correctly.
 
Could you please help on the topic to be able to add users to ENTREPRISE roles through API requests?
 
Best Regards,
Khaoula DOUHI
7 REPLIES 7

rushikeshvartak
All-Star
All-Star

Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]



⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️

 

You must have token issue


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

KhaoulaD
New Contributor III
New Contributor III

Hello,

Below the curl command:

KhaoulaD_0-1727340391785.png

 

And the postman screeshot:

KhaoulaD_1-1727340416810.png

Best Regards,

Khaoula

Share authorization tab screenshot


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

Hello,

 

Below the screenshots:

From the call:

KhaoulaD_0-1727689680369.png

From the collection:

KhaoulaD_2-1727689933666.png

 

Note that all other calls performed are successful. The call is successful even when the role type is "APPLICATION" but not when "ENTREPRISE".

We have also tried using BEARER TOKEN to keep it simple and same behaviour.

 

Best Regards,

Khaoula DOUHI

Please share logs


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

Hello,

The authentification is successful when gettig the token.

It's only the create request that's failing with 401 error without any message even with ROLE ADMIN.

 

Best Regards,

Khaoula DOUHI

Please share logs when you hitting create request API


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