# Workflow HTTP function

**URL:** <https://developer.sailpoint.com/discuss/t/workflow-http-function/20183>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, sailpoint-identity-security\
**Created:** [November 3, 2023, 10:51am UTC](https://developer.sailpoint.com/discuss/t/workflow-http-function/20183 "2023-11-03T10:51:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![PhilRawlings](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@PhilRawlings](https://developer.sailpoint.com/discuss/u/PhilRawlings)\
**Post date:** [November 3, 2023, 10:51am UTC](https://developer.sailpoint.com/discuss/t/workflow-http-function/20183/1 "2023-11-03T10:51:10Z")

</div>

Hi,  
The payload is sending a static rather than the variable when I am using this:  
“displayName”: “{{$.getIdentity.attributes.displayName}}”,

How am I meant to send the variable over?  
Thanks

---

<div class="post-metadata">

**Author:** ![shaileeM](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/shaileem/32/15314_2.png) [@shaileeM](https://developer.sailpoint.com/discuss/u/shaileeM)\
**Post date:** [November 6, 2023, 11:01am UTC](https://developer.sailpoint.com/discuss/t/workflow-http-function/20183/2 "2023-11-06T11:01:43Z")

</div>

Hi Phil,

Can you share more details from the workflow trigger.

thanks

---

<div class="post-metadata">

**Author:** ![PhilRawlings](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@PhilRawlings](https://developer.sailpoint.com/discuss/u/PhilRawlings)\
**Post date:** [November 6, 2023, 11:29am UTC](https://developer.sailpoint.com/discuss/t/workflow-http-function/20183/3 "2023-11-06T11:29:52Z")

</div>

Hi Shailee,  
The workflow is functioning fine (I think), it triggers this which gets sent, but the variables are not getting sent:

```auto
			"HTTP Request": {
				"actionId": "sp:http",
				"attributes": {
					"jsonRequestBody": {
						"accountActive": "true",
						"allEPOS": {
							"epos": "{{$.getIdentity.attributes.enactorEpos0}}"
						},
						"allEmployments": {
							"role": "{{$.getIdentity.attributes.enactorRole0}}"
						},
						"displayName": "{{$.getIdentity.attributes.displayName}}",
						"email": "{{$.getIdentity.attributes.email}}",
						"employeeNumber": "{{$.getIdentity.attributes.enactorid}}",
						"lastName": "{{$.getIdentity.attributes.lastname}}",
						"loginCode": "{{$.getIdentity.attributes.enactorid}}",
						"password": "{{$.getIdentity.attributes.adFirstPassword}}",
						"personalEmail": "{{$.getIdentity.attributes.personalEmail}}",
						"phone": "{{$.getIdentity.attributes.phone}}",
						"preferredName": "{{$.getIdentity.attributes.preferredFirstName}}",
						"primaryCountry": {
							"country1": "{{$.getIdentity.attributes.country}}",
							"country2": "{{$.getIdentity.attributes.countryAlpha2}}",
							"country3": "{{$.getIdentity.attributes.countryAlpha3}}",
							"country4": "{{$.getIdentity.attributes.countryNumeric}}"
						},
						"primaryEmployment": {
							"businessType": "{{$.getIdentity.attributes.businessType}}",
							"companyName": "{{$.getIdentity.attributes.company}}",
							"costCentre": "{{$.getIdentity.attributes.costCentre}}",
							"department": "Retail Optics",
							"division": "Retail Optics",
							"employeeType": "{{$.getIdentity.attributes.employeeType}}",
							"isApprentice": "false",
							"isContingent": "false",
							"isDirector": "false",
							"isManager": "{{$.getIdentity.attributes.enactorIsmanager}}",
							"jobClassification": "{{$.getIdentity.attributes.jobClassification}}",
							"jobTitle": "{{$.getIdentity.attributes.title}}",
							"locationName": "{{$.getIdentity.attributes.location}}",
							"managerId": "{{$.getIdentity.attributes.managerIdPrestart}}",
							"managerName": "{{$.getIdentity.attributes.managerNameCustom}}",
							"primaryEPOS": "{{$.getIdentity.attributes.primaryEpos}}",
							"startDate": "{{$.getIdentity.attributes.startDate}}"
						},
						"sAMAccountName": "{{$.getIdentity.attributes.liveSamaccountname}}",
						"salutation": "{{$.getIdentity.attributes.epayTitle}}",
						"userPrimaryRole": "{{$.getIdentity.attributes.enactorRoleCode}}",
						"userPrincipalName": "{{$.getIdentity.attributes.adUpn}}",
						"userStatus": "1",
						"username": "{{$.getIdentity.attributes.liveSamaccountname}}"
					},
					"method": "patch",
					"requestContentType": "json",
					"requestHeaders": {
						"Content-Type": "application/json",
						"Ocp-Apim-Subscription-Key": "529409c3e6ba42f5af58ced305d42711"
					},
					"url": "https://apimem4qsis001.azure-api.net/api/users/{{$.getIdentity.attributes.liveSamaccountname}}/update?app=Enactor"
				},
				"description": "API Call to Enactor.\nNo End Date. Only EPOS0",
				"nextStep": "End Step — Success",
				"type": "action",
				"versionNumber": 2
			},

```

---

<div class="post-metadata">

**Author:** ![jsosa](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/jsosa/32/31578_2.png) [@jsosa](https://developer.sailpoint.com/discuss/u/jsosa)\
**Post date:** [November 6, 2023, 2:07pm UTC](https://developer.sailpoint.com/discuss/t/workflow-http-function/20183/4 "2023-11-06T14:07:35Z")

</div>

Hi Phil, yes that is the way, it works for me in other workflows. Other attributes are being sending as the literal ${{xxxxxxxx}} or as its vaue?

---

<div class="post-metadata">

**Author:** ![PhilRawlings](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@PhilRawlings](https://developer.sailpoint.com/discuss/u/PhilRawlings)\
**Post date:** [November 6, 2023, 2:20pm UTC](https://developer.sailpoint.com/discuss/t/workflow-http-function/20183/5 "2023-11-06T14:20:32Z")

</div>

This is a snip from the payload received:  
Its not sending the value  
 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/a/a63bba64179f68c5df302a6bedca2b6a9d4ec387.png)

---

<div class="post-metadata">

**Author:** ![Ibm-Arab-Idmedge](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@Ibm-Arab-Idmedge](https://developer.sailpoint.com/discuss/u/Ibm-Arab-Idmedge)\
**Post date:** [December 5, 2023, 12:38pm UTC](https://developer.sailpoint.com/discuss/t/workflow-http-function/20183/6 "2023-12-05T12:38:00Z")

</div>

Hello Phil,

If there’s a missing attribute from the identity’s attributes then it will result in passing of Static Values for the other attributes as well. So you need to make sure that every attribute you are passing in your HTTP Request is present in Identity’s attributes.

You can test it by sending an single existing attribute to the HTTP Request.

Thank You,  
Ibrahim

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [February 3, 2024, 12:38pm UTC](https://developer.sailpoint.com/discuss/t/workflow-http-function/20183/7 "2024-02-03T12:38:22Z")

</div>

Closed on February 3, 2024, 12:38pm UTC

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