Microsoft Copilot & 365 Widget


Quick Links 

 

Overview  

The Microsoft 365 widget is a ServiceDesk Plus custom widget that brings Microsoft 365 capabilities into the request detail right panel. Technicians can schedule Teams meetings linked to the current request, chat with Microsoft 365 Copilot with request context pre-loaded, and search SharePoint and OneDrive content for relevant articles or files.

The widget uses one Azure AD app registration and one signed-in Microsoft account for all three features, so technicians sign in once per browser session.

Who this guide is for:

Prerequisites  

Before you configure the widget, ensure the following:

Important: Without a Microsoft 365 Copilot licence, Ask Copilot returns a 403 error. Standard Microsoft 365 licences are sufficient for meetings and SharePoint search.

 

Download Widget

Head here to download the widget.
 

Azure AD App Registration

The widget requires a single Azure AD (Microsoft Entra ID) app registration. Complete the following steps in the Azure portal.


Create the App Registration


Configure the Redirect URI

The widget uses a popup flow for authentication. The redirect URI must point to the msteams-auth-redirect.html file deployed alongside the widget.

 

https://<your-sdp-domain>/custom/msteams-auth-redirect.html

 

 

Grant API Permissions

The widget uses Microsoft Graph delegated permissions. Add all of the following permissions to the app registration.

 

Permission

Purpose

Calendars.ReadWrite.Shared

Create calendar events (Teams meetings) on behalf of the user

Sites.Read.All

Search SharePoint sites and read content

Mail.Read

Read the signed-in user's mail (used for identity validation)

People.Read.All

Resolve people and attendees across the organisation

OnlineMeetingTranscript.Read.All

Read transcripts of online meetings

OnlineMeetings.ReadWrite

Create and manage Teams online meetings

Chat.Read

Read Teams chat messages

ChannelMessage.Read.All

Read Teams channel messages

ExternalItem.Read.All

Read external items indexed in Microsoft Search

 

 

Admin Consent

Several permissions (such as People.Read.All and OnlineMeetingTranscript.Read.All) require admin consent. A Global Administrator or Privileged Role Administrator must grant it.

 

 

 

Note: Without admin consent the widget will load, but individual Graph calls may return 403 Forbidden errors. If technicians see permission errors after signing in, verify that admin consent has been granted for all scopes.


Collect the Required Values

Collect these two values from the app registration Overview page before editing config.json:

 

Value

Where to find it

Application (client) ID

Shown on the Overview page — a GUID,

 

Directory (tenant) ID

Also on the Overview page — the GUID for your Azure AD tenant


Configure the Widget  (config.json)

Before packaging the widget, open config.json and replace the three placeholders with the values collected in Section 3.5.

Placeholders to Replace

Placeholder

Replace with

<client-id>

Replace with the Application (client) ID from the app registration

<tenant-id>

Replace with the Directory (tenant) ID from the app registration

<sdp-domain>

Replace with the hostname of your SDP instance (e.g. helpdesk.yourcompany.com)

 

Example of a completed config.json:

 

{
    "clientId": "12345678-abcd-efgh-ijkl-000000000000",
    "tenantId": "87654321-wxyz-abcd-1234-000000000000",
    "redirectUri": "https://helpdesk.yourcompany.com/custom/msteams-auth-redirect.html",
    "scopes": [
        "Calendars.ReadWrite.Shared",
        "Sites.Read.All",
        "Mail.Read",
        "People.Read.All",
        "OnlineMeetingTranscript.Read.All",
        "OnlineMeetings.ReadWrite",
        "Chat.Read",
        "ChannelMessage.Read.All",
        "ExternalItem.Read.All"
    ],
    "slashCommands": [ ... ]
}

Slash Commands

The slashCommands array defines the Copilot shortcuts available to technicians. One command is included by default. Additional commands can be added at any time.

 

Field

Description

command

The text typed in the chat composer, e.g.  /summarise ticket

description

Short help text shown in the command picker and welcome suggestions

prompt

The actual instruction sent to Copilot when the command is used

shouldEnableWebSearch

(optional) true/false — turns on web search for this command. Defaults to false

includeRequestContext

(optional) true/false — attaches ticket context to the prompt. Defaults to true

 

Context placeholders available inside the prompt field:

 

{{request.id}}

{{request.subject}}

{{request.description}}

{{request.descriptionSummary}}

{{request.status}}

{{request.priority}}

{{request.group}}

{{request.requesterName}}

{{request.requesterEmail}}

{{request.technicianName}}

{{request.technicianEmail}}


Package the Widget (ZIP)

SDP custom widgets are uploaded as a ZIP archive. The archive must contain the individual widget files at the root level — do not zip the parent folder. Select the files individually and zip them.

Files to include in the ZIP:

File

Purpose

msteams.html

Main widget shell (entry point)

msteams_util.js

All widget logic — auth, meetings, Copilot, SharePoint

styles.css

Widget styling

msteams-auth-redirect.html

MSAL popup redirect handler

config.json

Azure AD config and slash commands (placeholders already replaced)

plugin-manifest.json

SDP plugin definition

m365_logo.png

Microsoft 365 logo used in the widget header

teams_logo.png

Teams logo used on the sign-in screen

copilot_icon.png

Copilot icon used in the Copilot card and chat

 

Important: Do not include any existing .zip file. SDP expects the files at the root of the archive — not inside a subfolder.


Upload to ServiceDesk Plus

You need SDP Administrator access to complete these steps.

 

Using the widget  

Authentication  

The widget uses the Microsoft Authentication Library (MSAL) running entirely in the browser. Authentication happens once per session in a pop-up window.

  1. On first use, click Sign in with Microsoft in the widget.

  2. Sign in with the Microsoft account that matches your ServiceDesk Plus login email.

  3. The widget validates the account match and caches it for the session.

If your ServiceDesk Plus user changes, the cached account is cleared and you must sign in again. Tokens refresh silently where possible; a pop-up appears only when silent refresh fails. To sign out, click the × button in the widget header.

Create a meeting  

Schedule a Microsoft Teams online meeting from the request detail panel.

Field

Behaviour

Meeting title

Pre-filled as Request ID: {id} - {subject}. Editable before creating.

Attendees

Tag-style email input. The requester's email is added automatically when ServiceDesk Plus provides it. Add more attendees manually.

When — Now

Creates the meeting immediately, starting from the current time.

When — Schedule

Reveals start and end date and time pickers for scheduling in advance.

Add note to ticket

Toggle (enabled by default). Adds the meeting details as a request note after creation.

Add note to request  

When the Add note to ticket toggle is on (the default), the widget adds a formatted request note after the meeting is created. The note includes:

If the toggle is off, the meeting is still created and the note step is skipped. If note creation fails, the meeting result screen still shows the join link alongside an inline error message.

Ask Copilot  

Open an embedded Microsoft 365 Copilot chat inside the widget. The current request context is loaded automatically so Copilot can answer request-aware questions.

Note: Copilot conversation APIs are Microsoft Graph beta endpoints. A technician must have a Microsoft 365 Copilot licence assigned. If the licence is missing, conversation creation returns a 403 error.

Slash commands  

Slash commands are pre-defined prompts that you can trigger with a single click or by typing / in the Copilot composer.

The default built-in command is /summarise ticket, which generates a concise IT-support summary of the current request — issue, impact, status, priority, and recommended next step. Add more commands by editing the slashCommands array in config.json.

SharePoint search  

Search across all SharePoint sites and OneDrive content accessible to your Microsoft account, from the request panel.

 

Troubleshooting  
 

Symptom

Why this happens

Resolution

Sign-in pop-up blocked

The browser is blocking pop-ups for the ServiceDesk Plus domain. MSAL requires a pop-up window for authentication.

Allow pop-ups for the ServiceDesk Plus domain in browser settings.

redirect_uri_mismatch error in the auth pop-up

The redirectUri in config.json does not exactly match the URI registered in Azure.

Check for trailing slashes, HTTP vs HTTPS, and case sensitivity. Re-save the URI in both places.

403 Forbidden on Graph calls after sign-in

Admin consent has not been granted for one or more permissions. Delegated permissions that require admin consent cannot be self-consented by end users.

Go to the app registration > API permissions and click Grant admin consent.

Copilot returns 403 or "You do not have access"

The technician does not have a Microsoft 365 Copilot licence assigned.

Assign a Copilot licence in the Microsoft 365 admin centre.

Widget shows a blank or white screen

The most common cause is a malformed config.json or files zipped inside a subfolder rather than at the archive root.

Open the browser developer console (F12 > Console) for the exact error. Verify config.json parses as valid JSON and that the ZIP contains files at the root level.

Meeting created but note not added

The widget could not write to the ServiceDesk Plus request API. The meeting itself is unaffected, and the join link is still available on the result screen.

Check that the ServiceDesk Plus API is reachable and the request ID is valid. Retry from the meeting result screen.

Widget rejects sign-in with an email mismatch error

The Microsoft account email does not match the ServiceDesk Plus user email.

Sign in with the Microsoft account that matches your ServiceDesk Plus login email.