microsoft / microsoft/Agent365-Samples
Unable to grant admin consent for MCP permissions in n8n sample-agent (Step 4 failure — Graph Explorer run disabled)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 108
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
While following the setup instructions for the n8n sample-agent, I am unable to successfully grant admin consent for the required Agent365 MCP permissions described in Step 4: Grant Permissions for Agent.
Although I can add the permissions successfully, I am not able to grant admin consent, which blocks the agent from authenticating.
Sample Used
https://github.com/microsoft/Agent365-Samples/tree/main/nodejs/n8n/sample-agent
Environment
- Tenant Type: Microsoft 365 tenant
- User Role: Global Administrator
- Deployment: Local n8n instance
- OS: Windows 11
- Agent Blueprint created via Teams Developer Portal
- Agent published to Microsoft Admin Center successfully
- Client Secret created successfully
Steps Followed
-
Created Agent Blueprint using Teams Developer Portal.
-
Published the manifest to Microsoft Admin Center.
-
Added Client Secret to App Registration.
-
Followed Step 4: Grant Permissions for Agent from README.
-
Added required permissions to the App Registration through UI.
-
Attempted to grant admin consent using:
- Graph Explorer
- Azure Portal UI
- Admin consent URLs
Permissions Added
The following permissions were successfully added:
Microsoft Graph (Delegated):
- User.ReadBasic.All
- Mail.Send
- Mail.Read
- Chat.Read
- Chat.ReadWrite
Agent365 MCP Permissions:
- McpServers.Calendar.All
- McpServers.Excel.All
- McpServers.Files.All
- McpServers.Mail.All
- McpServers.Me.All
- McpServers.OneDriveSharepoint.All
- McpServers.PowerPoint.All
- McpServers.SharepointLists.All
- McpServers.Teams.All
- McpServers.Word.All
- McpServersMetadata.Read.All
Power Platform:
- Connectivity.Connections.Read
Observed Behavior
-
I was able to add permissions successfully from the Azure Portal UI.
-
However, I was not able to grant admin consent for these permissions.
-
User.ReadBasic.All
-
Mail.Send
-
Mail.Read
-
Chat.Read
-
Chat.ReadWrite
-
When attempting to grant permissions using Graph Explorer, the Run button was disabled, preventing execution.
-
When attempting admin consent via UI, consent does not complete successfully.
-
When running the n8n workflow, authentication fails with:
AADSTS65001:
The user or administrator has not consented to use the application.
Expected Behavior
Admin consent should be granted successfully, and all permissions should show:
Status: Granted for <Tenant>
After consent, the n8n workflow should authenticate successfully.
Screenshots of:
- API Permissions page
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Step 4 of the n8n sample-agent README and compare the listed permissions with the App Registration state. Reproduce the admin-consent attempts in Graph Explorer and the Azure Portal UI, then run the n8n workflow; done means consent is granted for the tenant and authentication no longer returns AADSTS65001.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, node.js
- Domain
- authentication, authorization, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100