Skip to content

Unable to grant admin consent for MCP permissions in n8n sample-agent (Step 4 failure — Graph Explorer run disabled) #268

@Yogeshp-MSFT

Description

@Yogeshp-MSFT

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

  1. Created Agent Blueprint using Teams Developer Portal.

  2. Published the manifest to Microsoft Admin Center.

  3. Added Client Secret to App Registration.

  4. Followed Step 4: Grant Permissions for Agent from README.

  5. Added required permissions to the App Registration through UI.

  6. 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
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions