Announcing the SAVIYNT KNOWLEDGE EXCHANGE unifying the Saviynt forums, documentation, training, and more in a single search tool across platforms. Click HERE to read the Announcement.

/createrequest API is failing with 500 Internal server error when trying to remove a role from user.

Anurag
Regular Contributor
Regular Contributor
Hi Team,
 
When we are trying to provision/remove a role from user by using "/createrequest" API, we are getting an error message as "An unexpected error occured" with 500 status code. 
  
API Name : {{url}}/ECM/{{path}}/createrequest
 screenshot.png
 
 
 
 
I can see below lines from application logs pointing to Null pointer exception.
 
2023-03-06 05:24:38,707 [https-jsse-nio-443-exec-423] DEBUG ws.Restfulv5Controller - Default max limit is set to 50
2023-03-06 05:24:38,708 [https-jsse-nio-443-exec-423] DEBUG ws.Restfulv5Controller - Enter createrequest
2023-03-06 05:24:38,708 [https-jsse-nio-443-exec-423] DEBUG ws.Restfulv5Controller - Processing Roles createrequest
2023-03-06 05:24:38,711 [https-jsse-nio-443-exec-423] ERROR auth.OauthProviderService - Error...
java.lang.NullPointerException
2023-03-06 05:24:38,713 [https-jsse-nio-443-exec-423] ERROR ws.Restfulv5Controller - Error...
java.lang.NullPointerException
2023-03-06 05:24:38,713 [https-jsse-nio-443-exec-423] DEBUG ws.Restfulv5Controller - Processing Roles createrequest completed
 
Please let us know if you have any input on this.
 
Thanks
 
11 REPLIES 11

Darshanjain
Saviynt Employee
Saviynt Employee

Hi @Anurag 

Can you please check if you have any Dynamic attribute created in Global config for the Firefighter roles, That may cause the issue, If there is nothing, then i would suggest you to create a FD and assign it as the payload looks correct and it should work.

 

Thanks

Darshan

Anurag
Regular Contributor
Regular Contributor

Hi Darshan,

We do not have any Dynamic attribute available in Global config for any type of roles.

Thanks

Okay, You can create a FD and support should be able to resolve it.

Bharadwaj
Regular Contributor
Regular Contributor

Hi, did you find a solution for this issue?

Hi @Bharadwaj 

Are you getting the same error, if yes then you can check in settings ? oAtuth and disable it if its enabled. that will resolve the error, or if there is any other error you can put it here

 

Thanks

Darshan

Hi Darshanjain,

After we changed the OAuth settings as per your instructions, we are unable to login to our instance because it is asking for an approval on the SSO page. After we enabled OAuth, we were able to login to our instance without any issues. 

 

Screenshot of SSO approval:

Screenshot 2023-04-25 at 10.54.10.png

Logs for API error:

2023-04-24 15:05:52,811 [https-jsse-nio-443-exec-20] DEBUG ws.Restfulv5Controller - Processing Roles createrequest
2023-04-24 15:05:52,813 [https-jsse-nio-443-exec-20] ERROR auth.OauthProviderService - Error...
java.lang.NullPointerException
2023-04-24 15:05:52,817 [https-jsse-nio-443-exec-20] ERROR ws.Restfulv5Controller - Error...
java.lang.NullPointerException
2023-04-24 15:05:52,818 [https-jsse-nio-443-exec-20] DEBUG ws.Restfulv5Controller - Processing Roles createrequest completed
2023-04-24 15:05:56,566 [https-jsse-nio-443-exec-12] DEBUG auth.LoginController - Default Setup
2023-04-24 15:05:56,566 [https-jsse-nio-443-exec-12] DEBUG auth.LoginController - URL TO SAML LOGIN2=/ECM/login/index?login=true&idp=https://saml.easa.europa.eu JSESSIONID =09392C2D66DC6235B7FAA4D2278EB9A3
2023-04-24 15:06:26,549 [https-jsse-nio-443-exec-1] DEBUG auth.LoginController - Default Setup
2023-04-24 15:06:26,550 [https-jsse-nio-443-exec-1] DEBUG auth.LoginController - URL TO SAML LOGIN2=/ECM/login/index?login=true&idp=https://saml.easa.europa.eu JSESSIONID =2A0A1E1092D61446228037CC661320CA
2023-04-24 15:06:56,538 [https-jsse-nio-443-exec-13] DEBUG auth.LoginController - Default Setup
2023-04-24 15:06:56,539 [https-jsse-nio-443-exec-13] DEBUG auth.LoginController - URL TO SAML LOGIN2=/ECM/login/index?login=true&idp=https://saml.easa.europa.eu JSESSIONID =A46D9D97A3AEA309EE754FABE5F86E39
2023-04-24 15:07:11,936 [https-jsse-nio-443-exec-33] DEBUG rest.JwtService - Parsed an HMAC signed JWT
2023-04-24 15:07:11,937 [https-jsse-nio-443-exec-33] DEBUG rest.JwtService - Parsed an HMAC signed JWT
2023-04-24 15:07:11,988 [https-jsse-nio-443-exec-33] DEBUG ws.Restfulv5Controller - Default max limit is set to 50
2023-04-24 15:07:11,988 [https-jsse-nio-443-exec-33] DEBUG ws.Restfulv5Controller - Processing Roles createrequest
2023-04-24 15:07:11,990 [https-jsse-nio-443-exec-33] ERROR auth.OauthProviderService - Error...
java.lang.NullPointerException
2023-04-24 15:07:11,993 [https-jsse-nio-443-exec-33] ERROR ws.Restfulv5Controller - Error...
java.lang.NullPointerException
2023-04-24 15:07:11,994 [https-jsse-nio-443-exec-33] DEBUG ws.Restfulv5Controller - Processing Roles createrequest completed
2023-04-24 15:07:26,463 [https-jsse-nio-443-exec-32] DEBUG auth.LoginController - Default Setup
2023-04-24 15:07:26,463 [https-jsse-nio-443-exec-32] DEBUG auth.LoginController - URL TO SAML LOGIN2=/ECM/login/index?login=true&idp=https://saml.easa.europa.eu JSESSIONID =8C23C6FE22046EA65C29340D3BA37D4C
2023-04-24 15:07:35,261 [https-jsse-nio-443-exec-10] DEBUG workflow.WorkflowmanagementController - else of enableV6Config
2023-04-24 15:07:35,261 [https-jsse-nio-443-exec-10] DEBUG workflow.WorkflowmanagementController - workflowManagementControllers-requesthome
2023-04-24 15:07:35,293 [https-jsse-nio-443-exec-10] DEBUG services.ArsRequestAllowedService - No delegate users found
2023-04-24 15:07:35,321 [https-jsse-nio-443-exec-10] DEBUG services.ArsRequestAllowedService - roletousermap:[27379###21:BHARAPA, 27379###1:BHARAPA, 27379###14:BHARAPA]
2023-04-24 15:07:35,323 [https-jsse-nio-443-exec-10] DEBUG services.ArsRequestAllowedService - retmap:[MODIFYREQUEST:false, STAT:3, ROLE_USER_MAP:[27379###21:BHARAPA, 27379###1:BHARAPA, 27379###14:BHARAPA], WCAT:2, REQHIS:[3, 2, 1], MY_REQ_HISTORY_MAP:[27379###21:1, 27379###1:3, 27379###14:2], REQ:3]
2023-04-24 15:07:35,333 [https-jsse-nio-443-exec-10] DEBUG services.WorkflowService - Enter loadRequestData - forceRefresh: false
2023-04-24 15:07:35,335 [https-jsse-nio-443-exec-10] DEBUG services.ArsRequestAllowedService - No delegate users found
2023-04-24 15:07:35,345 [https-jsse-nio-443-exec-10] DEBUG services.ArsRequestAllowedService - roletousermap:[27379###21:BHARAPA, 27379###1:BHARAPA, 27379###14:BHARAPA]
2023-04-24 15:07:35,347 [https-jsse-nio-443-exec-10] DEBUG services.ArsRequestAllowedService - retmap:[MODIFYREQUEST:false, STAT:3, ROLE_USER_MAP:[27379###21:BHARAPA, 27379###1:BHARAPA, 27379###14:BHARAPA], WCAT:2, REQHIS:[3, 2, 1], MY_REQ_HISTORY_MAP:[27379###21:1, 27379###1:3, 27379###14:2], REQ:3]

 

Please suggest us a better solution for this issue.

 

Thanks.

Hi @Bharadwaj 

The config Oauth shouldn't cause the SSO issue, it is used only for generate Api token and shouldn't cause the above issue as you are saying, we may need saml tracker but we would suggest you to raise FD on this and check there with logs.

 

Thanks

Darshan

Hi,

We have changed the setting on our Service provider so that it doesn't go for approval. Issue has been resolved on our side.

Thanks!

Okay thanks for the update

The API call works for me. What is the error that you see?

dgandhi_0-1682352787970.png

 

Thanks

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.

Bharadwaj
Regular Contributor
Regular Contributor

Thanks, It worked after disabling the OAuth. Could you please tell me how was this affecting the functionality because it was working before with OAuth enabled?

 

Thanks.