Trigger Azure Automation runbook from ServiceNow using Outbound Rest Message

Neeraj Kumar 51 Reputation points
2022-10-02T19:19:34.863+00:00

Hello Experts,

I am trying to integrate ServiceNow with Azure Automation, where I am trying to trigger Automation runbook from ServiceNow using Outbound REST message. For the same, the OAuth tokens are generated correctly and there seems no issue, but, when I try to call the below URL, I get the Internal Server 500 error.

https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/xxxxxx/providers/Microsoft.Automation/automationAccounts/ServiceNowIntegration/jobs/0001798444567?api-version=2019-06-01

  • {Cache-Control=no-cache, Pragma=no-cache, Content-Length=83, Content-Type=application/json; charset=utf-8, Expires=-1, x-ms-request-id=52d8c23d-6078-4629-942a-c993f4797984, Server=Microsoft-HTTPAPI/2.0, x-ms-failure-cause=service, x-ms-ratelimit-remaining-subscription-writes=1199, x-ms-correlation-request-id=41c5b203-6879-4404-be23-61674a0815a5, x-ms-routing-request-id=WESTUS:20221002T175129Z:41c5b203-6879-4404-be23-61674a0815a5, Strict-Transport-Security=max-age=31536000; includeSubDomains, X-Content-Type-Options=nosniff, Date=Sun, 02 Oct 2022 17:51:29 GMT, Connection=close}

The authorization token is passed as the request header and the runbook name is passed in the HTTP Query Parameter content.

Need urgent help on this as it has been more than 72 hours and there is no respite.

Regards,
Neeraj

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,368 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Neeraj Kumar 51 Reputation points
    2022-10-10T18:37:18.293+00:00

    I finally found the answer by using the 'PUT' request from ServiceNow Outbound Rest API instead of using the POST request. It worked like a charm. Thanks for the response

    0 comments No comments

  2. tbgangav-MSFT 10,426 Reputation points Moderator
    2023-04-17T18:55:25.3766667+00:00

    Hi Neeraj, Thanks for sharing the answer. This helps not only me but also other community members who might be into similar issue.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.