ServiceNow Integration#640
Conversation
- Add comprehensive ServiceNow integration guide with OAuth 2.0 setup - Include OpenAPI specifications for Incident Management and Knowledge Base APIs - Add agent instructions for ServiceNow support agent - Fix GROUP_ACTION_OAUTH_SCHEMA_MERGING: Ensure additionalFields preserved during schema merge - Fix GROUP_AGENT_LOADING: Improve group agent loading reliability - Fix OPENAPI_BASIC_AUTH: Support basic authentication in OpenAPI actions - Fix AZURE_AI_SEARCH_TEST_CONNECTION: Improve AI Search connection testing - Update version to 0.236.012
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive ServiceNow integration documentation and implements four critical bug fixes discovered during ServiceNow integration testing. The changes enable enterprise integrations with ServiceNow for incident management and knowledge base operations while fixing issues affecting OpenAPI authentication, group workspace functionality, and Azure AI Search connectivity testing.
Changes:
- Comprehensive ServiceNow integration documentation including OAuth 2.0 setup guide, agent behavioral instructions, and 7 OpenAPI specifications
- Fix for OpenAPI Basic Authentication credential parsing to support username:password format
- Fix for group action OAuth authentication by adding schema merging (parity with global actions)
- Fix for group agent loading in per-user semantic kernel mode to include all workspace agents
- Fix for Azure AI Search connection testing with managed identity authentication using SDK instead of REST API
- Infrastructure updates for Azure Speech Service with managed identity support and custom subdomain configuration
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/how-to/azure_speech_managed_identity_manul_setup.md | New documentation explaining Azure Speech Service managed identity setup requirements (filename has typo) |
| docs/how-to/agents/ServiceNow/SERVICENOW_INTEGRATION.md | Comprehensive ServiceNow integration guide covering setup, configuration, and testing |
| docs/how-to/agents/ServiceNow/SERVICENOW_OAUTH_SETUP.md | Detailed OAuth 2.0 configuration guide for production ServiceNow deployments |
| docs/how-to/agents/ServiceNow/servicenow_agent_instructions.txt | Agent behavioral instructions optimized for ServiceNow operations |
| docs/how-to/agents/ServiceNow/open_api_specs/*.yaml | Seven OpenAPI specification files for ServiceNow APIs (bearer token and basic auth versions) |
| application/single_app/semantic_kernel_plugins/openapi_plugin_factory.py | Adds credential format transformation for basic auth, bearer tokens, and OAuth2 |
| application/single_app/semantic_kernel_loader.py | Adds group agent and action loading for per-user semantic kernel mode |
| application/single_app/route_backend_settings.py | Replaces REST API approach with SDK-based Azure AI Search connection testing |
| application/single_app/route_backend_plugins.py | Adds schema merging to group action routes for OAuth field population |
| deployers/terraform/main.tf | Adds Speech Service resource with custom subdomain and RBAC role assignments |
| application/single_app/static/images/custom_logo.png | Updated custom logo image (binary file) |
| application/single_app/static/images/custom_logo_dark.png | Updated dark theme custom logo image (binary file) |
| application/single_app/config.py | Version bump from 0.236.011 to 0.236.012 |
docs/how-to/agents/ServiceNow/servicenow_agent_instructions.txt
Outdated
Show resolved
Hide resolved
docs/how-to/agents/ServiceNow/open_api_specs/sample_servicenow_incident_api.yaml
Outdated
Show resolved
Hide resolved
application/single_app/semantic_kernel_plugins/openapi_plugin_factory.py
Outdated
Show resolved
Hide resolved
application/single_app/semantic_kernel_plugins/openapi_plugin_factory.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…_incident_api.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
docs/how-to/agents/ServiceNow/agent_instructions/servicenow_agent_instructions.txt
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…factory.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…mplechat-development into servicenow-integration
- Changed 'indexes = list(...)' to '_ = list(...)' - Follows Python convention for discarded return values - AI Search connection test only needs to verify the API call succeeds
…nrelated to this servicenow integration
application/single_app/semantic_kernel_plugins/openapi_plugin_factory.py
Outdated
Show resolved
Hide resolved
docs/explanation/fixes/v0.236.012/GROUP_ACTION_OAUTH_SCHEMA_MERGING_FIX.md
Outdated
Show resolved
Hide resolved
Reverted route_backend_settings.py to origin/development version and removed AZURE_AI_SEARCH_TEST_CONNECTION_FIX.md documentation. These changes will be submitted in a dedicated PR to keep the ServiceNow integration PR focused.
2bb45d7 to
0c23a78
Compare
…factory.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…RGING_FIX.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…adme for configuration for 2 agents.
…this pull request has latest changes from v0.237.004 Development branch
…iceNow asset management
paullizer
left a comment
There was a problem hiding this comment.
There are changes to the loader but were not massive, and I dont think they negatively affect the workflow of existing actions.
Bionic711
left a comment
There was a problem hiding this comment.
I, at this time, cannot approve this PR. The changes to the loader break the separation of duties currently implemented in the active group concepts and allow cross-contamination of group RAG data across different agents/plugins.
I advocate to remove the SKLoader changes and approve everything else.
- Add comprehensive ServiceNow integration documentation entry - Document 4 critical bug fixes: - OpenAPI Basic Authentication credential parsing fix - Group Action OAuth schema merging fix - Group Agent loading in per-user kernel mode fix - Azure AI Search test connection fix - Move debug_print import to top-level in openapi_plugin_factory.py Version: 0.237.005
Good catch, @vivche. if you want, lets talk about correcting the code if you think its necessary or you can proceed to remove it and test out your changes with it returned to previous state |
… document and reference to v.0.237.008 folder
WHAT: - Changed group agent loading from ALL user groups to ACTIVE group only - Added security validation to prevent cross-group agent access - Updated import from get_user_groups to require_active_group WHY: - Prevents users from accessing group agents outside their active group - Fixes a security gap where selecting a group agent bypassed the active-group check - Aligns behavior with the intended single-active-group security model FILES: - semantic_kernel_loader.py (approx. lines 11801280) - GROUP_AGENT_LOADING_FIX.md VERSION: - 0.237.008
ServiceNow Integration Documentation and Bug Fixes
Overview
This PR adds comprehensive documentation for integrating ServiceNow with Simple Chat and fixes four critical bugs that were discovered during the ServiceNow integration testing. The bugs affect OpenAPI actions, group actions, group agents, and Azure AI Search connection testing.
📚 ServiceNow Integration Documentation
What's New
Complete ServiceNow Integration Guide
Documentation Files:
docs/how-to/agents/ServiceNow/SERVICENOW_INTEGRATION.md- Main integration guide (760 lines)docs/how-to/agents/ServiceNow/SERVICENOW_OAUTH_SETUP.md- OAuth 2.0 setup guide (480+ lines)docs/how-to/agents/ServiceNow/servicenow_agent_instructions.txt- Agent instructions (263 lines)docs/how-to/agents/ServiceNow/open_api_specs/- 7 OpenAPI YAML files (both bearer token and basic auth versions)Key Features:
🐛 Bug Fixes
1. OpenAPI Basic Authentication Fix
Issue Behavior:
OpenAPI actions configured with Basic Authentication failed with "session not authenticated" error, even when credentials were correct. The agent would report inability to access the API despite the credentials being stored successfully.
Root Cause:
Mismatch between how the UI stored Basic Auth credentials (as
username:passwordstring inauth.key) and how the OpenAPI plugin factory expected them (as separateusernameandpasswordproperties inadditionalFields).Files Modified:
application/single_app/semantic_kernel_plugins/openapi_plugin_factory.pyReference:
OPENAPI_BASIC_AUTH_FIX.md2. Group Action OAuth Schema Merging Fix
Issue Behavior:
Group actions with OAuth bearer token authentication failed with HTTP 401 Unauthorized errors. When editing a group action, the
additionalFieldsproperty was empty ({}), missing all authentication configuration fields that were present in working global actions.Root Cause:
Group action backend routes (
route_backend_plugins.py) did not callget_merged_plugin_settings()to merge UI form data with OpenAPI schema defaults, while global action routes did. This caused group actions to be saved without authentication configuration fields likeauth_method,base_url, and authentication credentials.Files Modified:
application/single_app/route_backend_plugins.pyReference:
GROUP_ACTION_OAUTH_SCHEMA_MERGING_FIX.md3. Group Agent Loading Fix
Issue Behavior:
Group agents were not appearing in the agent list when per-user semantic kernel mode was enabled. When users selected a group agent, it would fall back to the global "researcher" agent with zero plugins/actions available. Group agents would ask clarifying questions instead of executing available ServiceNow actions.
Root Cause:
The
load_user_semantic_kernel()function only loaded personal agents and global agents (when merge enabled), but completely omitted group agents from groups the user is a member of. The function did not fetch or load group agents despite the user having valid group memberships.Files Modified:
application/single_app/semantic_kernel_loader.pyReference:
GROUP_AGENT_LOADING_FIX.mdReference:
[GROUP_ACTION_OAUTH_SCHEMA_MERGING_FIX.md](https://github.com/user-attachments/files/24832463/GROUP_ACTION_OAUTH_SCHEMA_MERGING_FIX.md) [GROUP_AGENT_LOADING_FIX.md](https://github.com/user-attachments/files/24832464/GROUP_AGENT_LOADING_FIX.md) [OPENAPI_BASIC_AUTH_FIX.md](https://github.com/user-attachments/files/24832465/OPENAPI_BASIC_AUTH_FIX.md) AZURE_AI_SEARCH_TEST_CONNECTION_FIX.md📊 Impact Summary
ServiceNow Integration
Bug Fixes
🔄 Version Update
Updated version from
0.236.011to0.236.012🧪 Testing
All bugs were discovered and validated during ServiceNow integration testing:
📝 Files Changed
Documentation Added:
Code Modified:
config.py- Version updateopenapi_plugin_factory.py- Basic auth credential parsing fixroute_backend_plugins.py- Schema merging for group actionssemantic_kernel_loader.py- Group agent loading in per-user mode🎯 Related Issues
These fixes were discovered during ServiceNow integration work and are critical for: