Azure DevOps Integration
Integrate ServiceNow with Azure DevOps Pipelines for automated change management and deployment tracking
Overview
This guide demonstrates how to integrate ServiceNow change management with Azure DevOps Pipelines. ServiceNow provides an official Azure DevOps extension that simplifies integration, along with REST API options for custom workflows.
Integration Architecture
ββββββββββββββββββββββββββββββββββββββββββββββ
β Azure DevOps Pipeline β
β β
β ββββββββ ββββββββ βββββββββββββββββ β
β βBuild ββββ Test ββββ Create SNOW β β
β ββββββββ ββββββββ β Change Requestβ β
β βββββββββ¬ββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββββ β
β β Approval Gate β β
β ββββββββββββ¬ββββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββββ β
β β Deploy to Prod β β
β ββββββββββββ¬ββββββββββ β
β β β
β βΌ β
β ββββββββββββββββββββββ β
β β Close Change β β
β ββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββ
β ServiceNow β
β Change Request β
ββββββββββββββββββββMethod 1: Official ServiceNow Extension
Installation
Install Extension from Marketplace:
Navigate to: https://marketplace.visualstudio.com/items?itemName=ServiceNow.vss-services-servicenow-cicd
Click "Get it free"
Select your Azure DevOps organization
Install the extension
Configure Service Connection:
Go to Project Settings > Service Connections
Click New service connection
Select ServiceNow
Fill in:
ServiceNow URL:
https://your-instance.service-now.comUsername: ServiceNow service account
Password: Service account password
Service connection name:
ServiceNow-Prod
Using ServiceNow Tasks
Method 2: REST API Integration
Using PowerShell
Using Bash/cURL
Method 3: Azure DevOps Extensions with Variable Groups
Configure Variable Group
Create Variable Group (Pipelines > Library):
Name:
ServiceNow-ConfigVariables:
ServiceNowInstance: your-instanceServiceNowUsername: service-accountServiceNowPassword: β’β’β’β’β’β’β’ (mark as secret)AssignmentGroup: DevOps TeamCMDB_CI: prod-k8s-cluster
Link to Pipeline:
Standard Changes for Faster Deployments
Multi-Stage Deployments
Integrating with Azure DevOps Environments
Error Handling and Rollback
Best Practices
Use Service Principal Authentication
Instead of username/password, use Service Principal:
Cache ServiceNow Metadata
Parallel Deployments with Change Tracking
Troubleshooting
Enable Debug Logging
Common Issues
Service connection fails
Verify URL format: https://instance.service-now.com
Extension tasks not found
Install ServiceNow extension in Azure DevOps organization
Variable not available
Use stageDependencies syntax for cross-stage variables
PowerShell authentication fails
Check Base64 encoding of credentials
Next Steps
Additional Resources
Last updated