Integrationhub additional attributes from Azure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 01:05 AM
Hello everyone,
I have cloned the standard data stream "Look up Users Stream" and added the attribute onPremisesImmutableId to the pre-processing script.
I have also added a new label to the output.
The retrieval from Azure works, but the onPremisesImmutableId is not added in ServiceNow. My question is where the matching happens, under the Manage Security tab I find Output Users, but I can't find the specified values, here the attribute values:
Thanks for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2024 02:14 AM
IntegrationHub is a ServiceNow application that enables spokes to integrate with third-party systems and applications. When integrating with Azure, you may need to fetch additional attributes. Here's how you can do it:
1. **Create a Flow Designer Flow**: Start by creating a flow in Flow Designer. This flow will be used to call the Azure API and fetch the additional attributes.
2. **Add an Action Step**: In the flow, add an action step. This step will be used to call the Azure API.
3. **Configure the Action Step**: In the action step, configure the following fields:
- **Connection Alias**: Select the connection alias that you have created for Azure.
- **Resource**: Enter the Azure API endpoint that you want to call.
- **Method**: Select the HTTP method (GET, POST, etc.) that you want to use to call the Azure API.
- **Headers**: If required, add any headers that you need to send with the API request.
- **Parameters**: If required, add any parameters that you need to send with the API request.
4. **Parse the API Response**: After calling the Azure API, you will receive a response. You need to parse this response to extract the additional attributes. You can do this by adding a script step in the flow and using the JSON.parse() function.
5. **Store the Additional Attributes**: Once you have extracted the additional attributes, you can store them in a ServiceNow table. You can do this by adding a record step in the flow and configuring it to create or update a record in the desired table.
6. **Test the Flow**: Finally, test the flow to make sure that it is working correctly. You can do this by running the flow and checking the output.
Here is a sample code for parsing the API response:
javascript
var response = // the API response
var parsedResponse = JSON.parse(response);
var additionalAttributes = parsedResponse.additionalAttributes;
And here is a sample code for storing the additional attributes:
javascript
var record = new GlideRecord('your_table');
record.initialize();
record.additional_attributes = additionalAttributes;
record.insert();
Remember to replace 'your_table' and 'additional_attributes' with the actual table name and field name where you want to store the additional attributes.
nowKB.com