Skip to main content

Connect LoyJoy Headless to Microsoft Copilot Studio

With LoyJoy Headless you manage your LoyJoy AI agents from an AI assistant instead of the LoyJoy Manager. This guide shows how to connect the LoyJoy Manager MCP server to an agent in Microsoft Copilot Studio. You log in with your LoyJoy account, no API key needed.

What you can do with it​

Once connected, you work with LoyJoy in plain language from Copilot Studio, and after publishing also from Microsoft Teams or Microsoft 365 Copilot:

  1. Create and edit AI agents: for example, add a knowledge source, change opening hours or adjust instructions.
  2. Check and improve: ask which questions your agent could not answer and get suggestions to close the gaps.
  3. Query analytics: get key figures of your agents without opening the LoyJoy Manager.
  4. Publish: changes are made in the staging version. Your live agent only changes when you publish.

The connection uses the roles of your LoyJoy user. More background: LoyJoy Headless.

Before you start​

Microsoft Copilot or Microsoft Copilot Studio? Microsoft uses the name "Copilot" for several products. The LoyJoy Manager MCP server is connected in Microsoft Copilot Studio.

Microsoft Copilot (Copilot chat, Microsoft 365 Copilot)Microsoft Copilot Studio
What it isAI assistant you chat with, also in Word, Outlook and TeamsTool to build your own agents and connect external tools
Addresscopilot.cloud.microsoftcopilotstudio.microsoft.com
How to recognize it"Copilot" at the top left and a chat input "Nachricht an Copilot senden""Copilot Studio" at the top left, menu Agenten, Arbeitsabläufe, Apps
Connect the LoyJoy Manager MCP serverNoYes

You set up the connection once in Copilot Studio. After publishing, your team uses the agent in Teams or Microsoft 365 Copilot.

This is the Copilot chat. You cannot connect LoyJoy here:

The Microsoft Copilot chat, not Copilot Studio

This is Copilot Studio, where the setup takes place:

The Copilot Studio home page

Who does what:

PartWhoTime
Part 1: Prepare Copilot StudioYour Microsoft or Power Platform adminabout 45 minutes, only once
Part 2: Connect LoyJoyYou, with your LoyJoy accountabout 15 minutes

If your company already uses Copilot Studio, Part 1 is usually done. Ask your admin for an environment with Dataverse and Copilot credits and go to Part 2.

note

Screenshots and button labels are taken from the German interface of Copilot Studio. Some buttons, such as Create or Allow, are shown in English there as well. Microsoft updates the interface regularly, so details may differ.

Part 1: Prepare Copilot Studio​

For your admin. Copilot Studio needs three things before LoyJoy can be connected:

  1. A Copilot Studio license for the user. For testing, the free 30-day trial is enough: start the trial. A Microsoft work account is required, a personal email address does not work. The trial does not allow publishing.
  2. An environment with Dataverse. Without Dataverse, Copilot Studio cannot create agents.
  3. Copilot credits in this environment. Without credits, the agent does not answer.

Create an environment with Dataverse​

The default environment often has no Dataverse. Creating an agent then shows this error:

Error when the environment has no Dataverse

  1. Open the Power Platform admin center and click + Neu.

  2. Under Typ, choose Testversion or, for a company-wide setup, the type your company uses for productive environments.

  3. Choose the Geografie der Makroregion, enter a name and switch on Dataverse-Datenspeicher hinzufügen.

    New environment with Dataverse

  4. Leave Nutzungsbasierte Zahlung mit Azure off, click Weiter, choose language, currency and Sicherheitsgruppe, then click Speichern.

  5. Wait until the status is Bereit and Dataverse shows Ja. Click Aktualisieren to refresh.

    The new environment is ready with Dataverse

If the user's license does not allow the type Testversion, this error appears:

License error when creating a trial environment

In this case, choose the type Entwickler. It can usually be created by every user, but contains no credits, so the admin has to assign them.

New environment of type Entwickler

tip
  • Data location: with "Europäische Union & EFTA", Microsoft picks a data center within the EU and EFTA, for example in Switzerland. Choose a narrower geography if you need a specific country.
  • Access: with the security group Keine, every user of your Microsoft tenant can access the environment. For productive use, choose a security group.

Assign Copilot credits​

In the Power Platform admin center, open Lizenzierung > Copilot Studio and assign Copilot credits to the environment. See Manage Copilot credits capacity on Microsoft Learn for details.

Part 2: Connect LoyJoy​

For you. You need access to the prepared environment and a LoyJoy account with a role in your tenant, see Invitations and Roles.

Step 1: Create an agent​

  1. Open copilotstudio.microsoft.com directly. Do not use the Microsoft product page: if you are already logged in, it may open the Copilot chat instead.
  2. At the bottom left, check that the prepared environment is selected. Click the environment name to switch.
  3. On the home page, click Agent.
  4. Click Unbenannter Agent and enter a name, e.g. "LoyJoy Agent Manager".
  5. Replace the sample text under Anweisungen, for example with: "You help to manage AI agents in the LoyJoy Platform. Always use the tools of the LoyJoy Manager MCP server. Answer briefly."
  6. Remove Work IQ under Werkzeuge and Alle Websites durchsuchen under Wissen. This keeps the agent focused on LoyJoy.

A new agent in Copilot Studio

Step 2: Add the LoyJoy Manager MCP server​

  1. Next to Werkzeuge, click +.

    The dialog Tool hinzufügen

  2. Click + Hinzufügen at the top right and choose Model Context Protocol (MCP). The tab MCP only lists ready-made servers from Microsoft, LoyJoy is not among them.

    Adding a Model Context Protocol server

  3. Fill in the form:

    FieldValue
    ServernameLoyJoy Manager
    ServerbeschreibungVerwaltet LoyJoy KI-Agenten, Wissensdatenbank und Analytics in der LoyJoy Platform
    Server-URLhttps://app-cloud.loyjoy.com/mcp
    AuthentifizierungOAuth 2.0
    KonfigurationstypDynamisch (mit Ermittlung)

    The filled form MCP-Server hinzufügen

  4. Click Hinzufügen at the bottom of the form. Copilot Studio reads the login settings of the LoyJoy server automatically.

Step 3: Log in with LoyJoy​

  1. Under Verbindung, open the list next to Not connected and click Create new connection.

    Creating a new connection

  2. Optionally enter a display name and click Create.

    Creating the LoyJoy Manager connection

  3. A popup opens. Log in with your LoyJoy account, with your email address or with Mit Microsoft anmelden. If no popup opens, allow popups for copilotstudio.microsoft.com in your browser and click Create again.

    The LoyJoy login in the popup

  4. Click Allow to give Copilot Studio access to your LoyJoy account. "Credential Manager" is the name under which Copilot Studio registers with LoyJoy.

    Allowing access to the LoyJoy account

  5. The connection shows a green check mark. Click Hinzufügen at the bottom of the dialog.

    The connection is active

LoyJoy Manager is now listed under Werkzeuge. The connection is set up.

The LoyJoy Manager tool in the agent

Step 4: Test the agent​

  1. Click Vorschau at the top. The available credits of the environment are shown above the chat.
  2. Ask: "List my LoyJoy tenants." If Copilot Studio asks you to connect or allow, confirm.
  3. The agent answers with the names of the LoyJoy tenants your user has access to. Then ask, for example: "Which AI agents exist in the tenant Example GmbH?"

You are done. Publish the agent in Copilot Studio to use it in Teams or Microsoft 365 Copilot.

Example prompts​

  1. "Which AI agents exist in the tenant Example GmbH?"
  2. "In LoyJoy edit the agent 'Live Chat'. Set the opening hours to 10am to 6pm."
  3. "Which questions could the agent 'Live Chat' not answer last month? Suggest how to close these gaps."
  4. "Publish the agent 'Live Chat'."

For larger changes, describe them step by step and check the result in the LoyJoy Manager before publishing. The LoyJoy plugins for Claude and ChatGPT cannot be installed in Copilot Studio.

Data protection​

The agent sees your LoyJoy agent configuration and anonymized analytics. Conversations and other personal data of your end customers are not available. Your requests are processed by Microsoft according to your Microsoft contract. Security and compliance documents are in the LoyJoy Trust Center.

Troubleshooting​

ProblemSolution
You land in the Copilot chat instead of Copilot StudioOpen copilotstudio.microsoft.com directly
"Starten eines neuen Agents nicht möglich … Dataverse-Lösung"The environment has no Dataverse, see Part 1
"Der Benutzer besitzt keine Lizenz, die das Erstellen einer Umgebung zulässt"Choose the type Entwickler or ask your admin
LoyJoy is not listed in the tab MCPUse + Hinzufügen > Model Context Protocol (MCP)
The LoyJoy login does not openAllow popups for copilotstudio.microsoft.com
"You need credits to continue" in VorschauThe environment has no Copilot credits, see Assign Copilot credits
The agent can read but not changeYour LoyJoy role has no edit rights, see Invitations and Roles

Error when the environment has no Copilot credits