ITSM ServiceAide Integration - adding headers to the request

Hello,

We are trying to integrade ServiceAide with the Generic Service Desk Integration Module (SailPoint Generic SDIM.

Our problem is the api needs some headers in the request, that are used for authentication, and the connector only support Basic,Oauth2 and APIToken.

We tried putting the headers as fields in the request but that did not work.
Anyone integrated serviceAide as ITSM and have any tips?
Is it possible to include Headers in the request for this connector?

Thanks!

What kind of headers? The more details you can provide, the better we as a community can help you

5 String headers:

csm_app_url = (url)
user_auth_token = (auth info)
slice_token = (auth info)
webservice_user_name =  (auth info)
webservice_user_password =  (auth info)

this is the swagger: Swagger UI

The error on my current tests is:

using postman, if i dont send the user_auth_token header i can change the error, but in idn the error dont change. So my guess is that the headers are not being sent.

we tried some different ways of adding headers, but none worked:

            "provision": {
                "request": {
                    "headers": {
                        "user_auth_token": "user_auth_token",
                        "slice_token": "slice_token",
                        "csm_app_url": "https%3A////csmstaging.serviceaide.com//",
                        "webservice_user_password": "pass",
                        "webservice_user_name": "user"
                    },
                    "RequestedForID": "xx",
                    "Description": "#foreach($req in $plan.requests) #if($req.operation == 'Create') Create Account on application $req.resource #else For $req.id in application $req.resource #end #if($req.items) $newline #foreach($item in $req.items) #if ($item.name == '*disabled*' && $item.value == 'true') Disable Account. $newline #elseif ($item.name == '*disabled*' && $item.value == 'false') Enable Account. $newline #elseif ($item.name == '*locked*' && $item.value == 'false') Unlock Account. $newline #else $!item.Operation $item.name: $item.value $newline #end #end #else $newline $!req.Operation Account #end $newline #end",
                    "RequesterID": "xx",
                    "Categorization": "TI Sec",
                    "Source": "TI"
                },
                "requestRootElement": "$",
                "processResponseElementExpression": "$.data.TicketIdentifier",
                "resource": "/csmconnector/ServiceRequest",
                "responseElement": "$.data.ticketIdentifier",
                "requestRootElementType": "JSONObject"
            }

Just an update, the headers are indeed mandatory and we did not found an way around to make the request, and i could not find any service aide integrations with identityNow so far.
Just knowing if its possible to use custom headers with this generic ITSM connector would already be a win.

Thanks!

Can you try with the following provision values:

"provision": {
	"request": {
		"RequestedForID": "xx",
		"Description": "#foreach($req in $plan.requests) #if($req.operation == 'Create') Create Account on application $req.resource #else For $req.id in application $req.resource #end #if($req.items) $newline #foreach($item in $req.items) #if ($item.name == '*disabled*' && $item.value == 'true') Disable Account. $newline #elseif ($item.name == '*disabled*' && $item.value == 'false') Enable Account. $newline #elseif ($item.name == '*locked*' && $item.value == 'false') Unlock Account. $newline #else $!item.Operation $item.name: $item.value $newline #end #end #else $newline $!req.Operation Account #end $newline #end",
		"RequesterID": "xx",
		"Categorization": "TI Sec",
		"Source": "TI"
	},
	"requestRootElement": "$",
	"processResponseElementExpression": "$.data.TicketIdentifier",
	"resource": "/csmconnector/ServiceRequest",
	"responseElement": "$.data.ticketIdentifier",
	"requestRootElementType": "JSONObject",
	"headers": {
		"user_auth_token": "user_auth_token",
		"slice_token": "slice_token",
		"csm_app_url": "https%3A////csmstaging.serviceaide.com//",
		"webservice_user_password": "pass",
		"webservice_user_name": "user"
	}
}

It changed the error a little bit, now i get:

Error: Please contact your administrator
Request completed
sailpoint.connector.InvalidRequestException: [ InvalidRequestException ] [ Error details ] Invalid request received to IT Service Desk System. Status: 400, Output: {"timestamp":1703852756328,"status":400,"error":"Bad Request","message":"Required valid information for Headers: csm_app_url , user_auth_token , slice_token , webservice_user_name , webservice_user_password","path":"/csmconnector/ServiceRequest"}

If i dont send any headers on postman, the error is:

Error: Please contact your administrator
Request completed
sailpoint.connector.InvalidRequestException: [ InvalidRequestException ] [ Error details ] Invalid request received to IT Service Desk System. Status: 400, Output: {"timestamp":1702674227481,"status":400,"error":"Bad Request","message":"Required valid information for Headers: csm_app_urlwebservice_user_name , webservice_user_password","path":"/csmconnector/ServiceRequest"}

So i guess now some headers are in the request. Could it be that some special characters are getting broken, like the ‘csm_app_url’? thats why we did the encoding.
The ‘slice_token’ also have: . ( _ $

So i tested with a normal url in the headers, and a slice_token without any special characters (that should be a 401 response):
Request:

"headers": {
    "user_auth_token": "myauthtoken",
    "slice_token": "wrongslicehope",
    "csm_app_url": "https://csmstaging.serviceaide.com/",
    "webservice_user_password": "mypass",
    "webservice_user_name": "myuser"
}

Response:

Error: Please contact your administrator
Request completed
sailpoint.connector.InvalidConfigurationException: [ InvalidConfigurationException ] [ Possible suggestions ] a) Ensure that the configuration details are correct. b) Ensure that the user is active on the IT Service Desk System. c) For OAuth2, ensure that the access/refresh token is valid or has not expired on the IT Service Desk System. [ Error details ] Authentication failed. Status: 401 , Output: {"data":null,"error":"Failed to authenticate","status":"UNAUTHORIZED"}

Trying to mess with the special characters in the slice_token at the moment.

Thank you!

Can you try with another REST client like curl or Postman?
To check how the Generic Web service Connector/Service Desk is using the parameters, I often use https://webhook.site/.
This allows me to ensure that the parameters are passed properly.
You don’t need to pass the exact value but just a random string with . ( _ $

In postman and curl(from the VA) the request works fine.

After testing with https://webhook.site/ (btw, thank you for that), its clear that the headers are not being sent in the request:

"provision": {
	"request": {
		"RequestedForID": "xx",
		"Description": "xx",
		"RequesterID": "xx",
		"Categorization": "xx",
		"Source": "xx"
	},
	"requestRootElement": "$",
	"processResponseElementExpression": "$.data.TicketIdentifier",
	"resource": "/csmconnector/ServiceRequest",
	"responseElement": "$.data.ticketIdentifier",
	"requestRootElementType": "JSONObject",
	"headers": {
		"user_auth_token": "user_auth_token",
		"slice_token": "slice_token",
		"csm_app_url": "https://csmstaging.serviceaide.com/",
		"webservice_user_password": "pass",
		"webservice_user_name": "user"
	}
}

Trying with headers inside the request did not work, they are sent inside the body:

"provision": {
	"request": {
		"headers": {
			"user_auth_token": "user_auth_token",
			"slice_token": "slice_token",
			"csm_app_url": "https://csmstaging.serviceaide.com/",
			"webservice_user_password": "pass",
			"webservice_user_name": "user"
		},
		"RequestedForID": "xx",
		"Description": "xx",
		"RequesterID": "xx",
		"Categorization": "xx",
		"Source": "xx"
	},
	"requestRootElement": "$",
	"processResponseElementExpression": "$.data.TicketIdentifier",
	"resource": "/csmconnector/ServiceRequest",
	"responseElement": "$.data.ticketIdentifier",
	"requestRootElementType": "JSONObject"
}

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