HR Helpdesk is a template Declarative Agent designed to help employees troubleshoot their issues using insights from ServiceNow KB, and if not successful create a case in the right Centre of Excellence/table without much burden on the end user. Goals:
- Help employees resolve their HR issues via self serve
- If necessary, help them create a ServiceNow case with minimal effort.
This sample illustrates the following concepts:
- 🧭 Guide employees through common HR issues with conversational, easy-to-follow resolutions that reduce downtime
- 💡 Help users self-resolve problems in Accounts, Payroll, Benefits, Tax, Leave, Onboarding, or any other general HR support needed
- 📝 Create service /incident tickets in the correct Centre of Excellence or ServiceNow table (auto classification) with a clear summary of the issue, and relevant first-level debug information — reducing back-and-forth and enabling faster, more accurate resolution by Support teams.
| Version | Date | Comments |
|---|---|---|
| 1.0 | July 25, 2025 | Initial release |
- Microsoft 365 tenant with Microsoft 365 Copilot
- Visual Studio Code with the Microsoft 365 Agents Toolkit extension
- Node.js v20
- A ServiceNow account with API access
-
I’m travelling for work. However, the manager information in the Business Travel letter tool is incorrect.

- Clone this repository (or download this solution as a .ZIP file then unzip it)
- Open the Agents Toolkit extension and sign in to your Microsoft 365 tenant with Microsoft 365 Copilot
- Select Preview in Copilot (Edge) from the launch configuration dropdown
In your OpenAPI spec appPackage/apiSpecificationFile/openapi.yaml:
- Update the server URL to point to your ServiceNow instance
- Point authorization, token and refresh urls to your ServiceNow instance
- In your
ai-plugin.json(plugin manifest), go to theresponse_semanticssection for each function. You can customize the layout and data bindings to create richer, domain-specific views. Ensure all links point to your ServiceNow instance.
-
Log into your ServiceNow account and go to Application Registry under System OAuth

-
Create a new registry. Select option “Create an OAuth API endpoint for external clients”

-
Add callback URL as https://teams.microsoft.com/api/platform/v1.0/oAuthRedirect. You can leave other settings as defaults or customize it as per your needs. Hit Submit.

-
After Submit, your app will show in the list. Click on it to get access to Client secret

-
Copy Client ID and Client Secret. You will require it in step 6.

-
Setup Microsoft Graph Connector to add ServiceNow knowledge – This will allow agent to provide troubleshooting guidance based on your ServiceNow KB articles. Follow the steps in https://learn.microsoft.com/en-us/microsoftsearch/servicenow-knowledge-connector . After you setup Microsoft Graph Connector to add ServiceNow knowledge, add the connection IDs in the Agent file.

-
Provision Key & Secret in Copilot: When provisioning the Declarative Agent via the Teams Toolkit, you’ll be prompted to enter the Client ID (Key) and Client Secret. Use the values from the ServiceNow OAuth app you created.

We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
You can try looking at issues related to this sample to see if anybody else is having the same issues.
If you encounter any issues using this sample, create a new issue.
Finally, if you have an idea for improvement, make a suggestion.
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


