Share via

Tutorial: Connect to ServiceNow in Azure SRE Agent issue with OAuth

Gritti, Ariel 0 Reputation points
2026-03-12T09:49:09.0533333+00:00

Hi everyone,

We're trying to configure OAuth for MS Azure SRE in ServiceNow following this doc: https://learn.microsoft.com/en-us/azure/sre-agent/connect-servicenow

Isn't clear for us in "Authorize the connection", step 2, which user to use for sign in. Is a nominal user? an integration user? is that a ServiceNow's user?

User's image

Any help/guidance is welcome.
Thanks,
Ariel

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anshika Varshney 8,925 Reputation points Microsoft External Staff Moderator
    2026-03-19T18:24:33.24+00:00

    Hi Gritti, Ariel,

    This tutorial works well once a few key things are set correctly. Most connection issues between Azure SRE Agent and ServiceNow usually come from authentication or instance configuration rather than the agent itself.

    First, make sure the ServiceNow instance URL is correct. It should be the full instance URL you see in the browser when you log in to ServiceNow, in the format https://your‑instance.service‑now.com. Missing the instance name or using a shortened URL will cause the connection test to fail.

    Next, check the authentication method you selected. For quick testing or lab setups, basic authentication is fine, but the ServiceNow user must have permission to create, read, and update incidents. For production scenarios, OAuth 2.0 is recommended. When using OAuth, ensure the OAuth application is properly registered in ServiceNow and that the redirect URL exactly matches the one shown in the Azure SRE Agent portal. A mismatch here is one of the most common causes of connection failure.

    If you are using OAuth, also confirm that the client ID and client secret copied from ServiceNow are correct and were saved before leaving the page. Some ServiceNow versions only show the client secret once, and using an incomplete value will prevent authentication.

    After saving the configuration in Azure SRE Agent, wait for the validation step to complete. A successful connection will show that ServiceNow is connected. If validation fails, double‑check the credentials and the instance URL before retrying.

    Once the connection is successful, create a simple test incident directly in ServiceNow. The Azure SRE Agent should automatically pick it up, acknowledge it, and start investigation. If nothing happens, confirm that the agent is running and that incident integration is enabled in the agent settings.

    Microsoft’s official tutorial walks through both authentication options and the required ServiceNow setup in detail here https://learn.microsoft.com/azure/sre-agent/connect-servicenow

    There is also a practical end‑to‑end walkthrough with screenshots that shows what a successful setup and test incident look like https://techcommunity.microsoft.com/blog/appsonazureblog/connect-azure-sre-agent-to-servicenow-end-to-end-incident-response/4487824

    In most cases, carefully rechecking the ServiceNow URL, user permissions, and OAuth configuration resolves the issue. Once connected, the integration is stable and incidents should flow automatically from ServiceNow to Azure SRE Agent and back.

    Hope this helps you get the connection working smoothly.Please let me know if the issue persists after these checks. If you have any remaining questions or need additional details, I’ll be glad to provide further clarification or guidance. If you found my answer helpful, please consider switching it to an upvote so that others in the community can also benefit from it

    User's image Thankyou!


Your answer

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