Troubleshooting Microsoft Graph Plugin Issues in Copilot Agents Built with Microsoft 365 Agents Toolkit
Introduction
When building a Copilot agent using Microsoft 365 Agents Toolkit (previously known as Teams Toolkit), you may encounter certain errors that can hinder your progress. This blog post highlights common issues and provides solutions to help you resolve them effectively.
Common Issues and Fixes
1. name_for_human Exceeds 20 Characters
Issue:
You may encounter the following error when the name_for_human field in the ai-plugin.json file exceeds 20 characters:
name_for_humanin PluginManifestDocument has characters beyond the length 20 that MAY be ignored.
Example:

The name_for_human field in the ai-plugin.json file might look like this:
"name_for_human": "ThisIsAVeryLongNameThatExceeds20Characters"
name_for_human in PluginManifestDocument has characters beyond the length 20 that MAY be ignored.

Solution
To fix this issue:
- Open the
ai-plugin.json - Update the
name_for_humanfield to a shorter, meaningful name (e.g., ToDoAgent). - Update the
description_for_humananddescription_for_modelfields to provide concise and relevant descriptions.

2. OpenAPI Document Size Exceeds the Limit
Issue:
You may encounter the following error when the OpenAPI document size exceeds the allowed limit of 102400 KB:
(×) Error: Invalid Declarative Copilot Document: declarativeAgent.json. Problems discovered: OpenApi document size exceeds the limit of 102400 KB.
Example:

Cause:
This issue occurs when the OpenAPI specification file includes too many endpoints or functions, making the file size too large.
Solution:
To resolve this issue:
- Reduce the size of the OpenAPI specification by removing unnecessary endpoints or functions.
- Focus on specific functionality. For example, if your plugin is for managing tasks, remove unrelated functions like
SendMailfrom the OpenAPI spec.
Example Fix:
If the OpenAPI spec includes both SendMail and ToDo functions, remove the SendMail function to focus solely on ToDo functionality.
3. No Actions Loaded After Provisioning
Issue:
After provisioning the plugin, you may notice that no actions are loaded, and the plugin does not function as expected.
Example:

Solution:
- Verify that the OpenAPI specification file is correctly configured and does not exceed the size limit.
- Ensure that the
ai-plugin.jsonfile and the declarative agent manifest are properly linked to the OpenAPI spec. - Reprovision the plugin and test again.
Conclusion
Building a Copilot agent using Microsoft 365 Agents Toolkit (previously known as Teams Toolkit) can be a seamless process if common issues are addressed effectively. By ensuring fields like name_for_human adhere to character limits, optimizing the OpenAPI specification file, and verifying plugin configurations, you can avoid errors and streamline your development process.
If you encounter additional issues, feel free to share them in the comments or reach out for support. Happy coding!
References
- Copilot
- Declarative Agent
- SharePoint
- Plugin
- Teams
- M365 Copilot Extensibility
- M365 Copilot
- Teams Toolkit
- ttk
- atk
- Microsoft 365 Agents Toolkit