Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

500 error while integrating on-prem Exchange with Saviynt

yatishtiwari
Regular Contributor
Regular Contributor

Hi Team.

We are facing difficulties in integrating on-prem exchange with Saviynt. Please find the details below:

  1. Configured IIS on the Windows server.
  2. As it is a dev environment, we are using a self-signed certificate and IP address for binding.

yatishtiwari_3-1704917531427.png

  1. Enabled PS execution on the Windows server.
  2. Able to successfully connect with Windows machine via Saviynt.

yatishtiwari_0-1704917375185.png

  1. But when we are triggering the PowerShell from Saviynt we are having 500 error-

yatishtiwari_1-1704917375194.png

  1. When we are trying to access http://<windows machine Ip>/<Saviynt app base URL>  (within the same machine), it shows resource not found issue. We tried both http and https

I think the Saviynt app deployment is the issue. We followed all the mentioned steps but might be something incorrect.

yatishtiwari_2-1704917375197.png

Please let me know if you have any ideas or suggestions.

11 REPLIES 11

rushikeshvartak
All-Star
All-Star

Thank you, Rushikesh, 

We identified the issue. Our folder structure is as below:

yatishtiwari_0-1705006916292.png

When we are giving application path as, <Parent Folder>/Saviynt/WINPS, 

yatishtiwari_1-1705007031241.png

We receive the following error- 

yatishtiwari_2-1705007080135.png

When we are giving application path, <Parent Folder>/Saviynt/WINPS/Scripts, 

yatishtiwari_6-1705007881895.png

 

It is able to show the directory structure-

yatishtiwari_3-1705007230938.png

But now our WINPS connection fails.

So we had set up REST connector and we are trying to execute the following PS-

 "url": "http://10.212.10.11/Saviynt/PS/ExecutePSScript",
"httpMethod": "POST",
"httpParams": "{\"Script\":\"Powershell.exe -File C:\/inetpub\/wwwroot\/Saviynt\/WINPS\/Scripts\/PS\/ExecutePSScript\/SampleSaviyntPrint.ps1 \"}",

but receiving the following error-

yatishtiwari_4-1705007705525.png

Tried to execute the same within machine still same error-

yatishtiwari_5-1705007794277.png

Not sure what is missing. Please let me know if you have any idea..

Check from postman

405 Method Not Allowed error code means that your browser has sent an HTTP request (GET, POST, PUT, etc.) that isn't allowed for that specific resource, or URL.


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi @rushikeshvartak ,

Hi Tried to hit the URL from postman, and getting same in postman as well.

gwagh_1-1705042871525.png

 

 

Do we need to change in config file or changes that we have make?? 

do we need to create PS and ExecutePSScript folder? Our file structure is below.

C:\inetpub\wwwroot\Saviynt\WINPS\Scripts\PS\ExecutePSScript

 

gwagh_0-1705053608887.pnggwagh_1-1705053645684.png

Specified path's in Default web site and Saviynt. Please check and let me know if any thing is required

 

for now we have created a script under "C:\inetpub\wwwroot\Saviynt\WINPS\Scripts\PS\ExecutePSScript" folder.

 

yatishtiwari
Regular Contributor
Regular Contributor

Hi Rushikesh,

I think the problem is with the handler. When we are invoking the REST command, it goes to StaticFileHandler, DefaultDocumentHandler. But these handlers do not support the POST method.

So which handler do we need to configure?

 

yatishtiwari_1-1705199065100.png

yatishtiwari_2-1705199093955.png

 

 

Hi @yatishtiwari @gwagh 

Could you please confirm if you have followed the WIN-PS connector guide, and at which point you have observed the issue? Understanding the Integration between EIC and Windows Server (saviyntcloud.com)

Any reason why you are not using WIN-PS connector rather than REST to run the PowerShell script?

Regards,

Dhruv Sharma

Dhruv_S
Saviynt Employee
Saviynt Employee

Hi @yatishtiwari 

Please refer the below steps from the connector guide for the 4XX/5XX errors. Review the configuration and confirm. Also, as per the documents, physical path is the local folder path where you deploy the code. Please check and confirm.

Troubleshooting (saviyntcloud.com)

4xx or 5xx error Occurs while Deploying the Saviynt App

Regards,

Dhruv Sharma

 

yatishtiwari
Regular Contributor
Regular Contributor

Thank you, Dhruv and Rushikesh. 

Although we are still having some problems, the original issue has been resolved. The problem was following-

1- We need to create PS and ExecutePSScript folders under Saviynt App.

2- Application Path should be set to <Parent>/SaviyntApp/WINPS (If WINPS is present )

3- Even if everything is correct when u try to access https://<IP/HOST>/<APPNAME> it shows resource not found but if you trigger REST API< it should work.

4- Execution Policy should be assigned to RemoteSigned.

Hope it helps others.

Hi @yatishtiwari 

Just checking if you need any further help on this issue. 

Regards,

Dhruv Sharma

yatishtiwari
Regular Contributor
Regular Contributor

We can close this thread,