Copilot (Microsoft)
Microsoft Copilot connects to LeanLaw through an agent you build in Microsoft Copilot Studio. The agent uses LeanLaw's MCP server as a tool, and people at your firm chat with it in Microsoft 365 Copilot and Teams.
Your firm needs to be enabled first. See Get started.
Before you start
- A Copilot Studio license that can publish. A trial license can build and test an agent but can't publish it.
- Copilot enabled in LeanLaw. A firm administrator opens Settings → AI Agent Access, finds Copilot (Microsoft) and clicks Enable. Do this before you add the tool, so the first connection works.
1. Create the agent
-
Sign in to Copilot Studio.
-
On the Home page, describe what the agent is for, for example:
Code -
On the agent's Overview page, adjust the name, description and instructions to suit your firm.
2. Add LeanLaw as a tool
-
Open the agent's Tools page and select Add a tool.
-
Select New tool, then Model Context Protocol.
-
Fill in the server details:
-
Server name:
LeanLaw -
Server description:
Access to LeanLaw account with clients, matters, billable items (time, expenses, fees), and invoices. -
Server URL:
Code
-
-
Under authentication, choose OAuth 2.0, and set the type to Dynamic discovery.
-
Select Create, then Next.
-
In Add tool, select Create a new connection. A LeanLaw sign-in page opens. Sign in, review the permissions, and approve.
-
Select Add to agent.
-
Open the LeanLaw tool from the Tools page and set Credentials to use to End user credentials. Each person then connects with their own LeanLaw sign-in. With maker-provided credentials, everyone who uses the agent would act as you.
Copilot Studio registers itself with LeanLaw in step 5, so there is no client ID or secret to copy.
Use the URL exactly as written. A trailing slash is a different address and the connection will fail.
3. Test the agent
In the test chat, ask something only LeanLaw can answer, such as List my open matters. The first time, the
agent asks you to connect. Approve it and ask again.
4. Publish to Microsoft 365 Copilot and Teams
- Select Publish, then Publish again to confirm.
- Select Channels, then the Microsoft 365 and Microsoft Teams tile.
- Make sure Make agent available in Microsoft Copilot is selected, then select Add channel.
- Select See agent in Teams, then Add.
- To use it in Microsoft 365 Copilot, type
@, choose the agent, and ask your question.
To give it to colleagues, open the same channel panel and select Availability options. From there you can copy an install link, or show the agent to people you've shared it with. Microsoft's guide covers the options: Connect and configure an agent for Teams and Microsoft Copilot.
Each person connects once
The first time someone uses the agent, it asks them to connect. They sign in to LeanLaw, see exactly what is being requested, and approve it. Their connection carries their own access, so the agent can't see anything they couldn't see by signing in.
If Copilot isn't enabled yet
If nobody has enabled Copilot (Microsoft) for your firm, the sign-in stops at a LeanLaw page that says so. Choose Ask my administrator to approve it and the request appears in Settings → AI Agent Access. Once an administrator enables Copilot (Microsoft), connect again.
Disconnecting
- One person: an administrator ends that person's connection under Settings → AI Agent Access, or the person removes their LeanLaw connection in Copilot.
- The whole firm: an administrator disables Copilot (Microsoft) in Settings → AI Agent Access. Every Copilot Studio agent at the firm stops working with LeanLaw within seconds. Enabling it again restores them.