Skip to main content
Glama
DynamicEndpoints

BOD-25-01-CSA-Microsoft-Policy-MCP

block_high_risk_users

Block users identified as high risk to prevent unauthorized access and protect Microsoft 365 cloud services from security threats.

Instructions

Block users detected as high risk (MS.AAD.2.1v1)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic of the 'block_high_risk_users' tool by patching the identitySecurityDefaultsEnforcementPolicy to enable blocking of high-risk users.
    private async blockHighRiskUsers() { try { // Configure risk detection policy using Microsoft Graph API await this.graphClient .api('/policies/identitySecurityDefaultsEnforcementPolicy') .patch({ blockHighRiskUsers: true, riskLevelForBlocking: 'high', }); return { content: [ { type: 'text', text: 'High-risk users blocked successfully', }, ], }; } catch (error: unknown) { throw new McpError( ErrorCode.InternalError, `Failed to block high-risk users: ${error instanceof Error ? error.message : 'Unknown error'}` ); } }
  • Registration of the 'block_high_risk_users' tool in the listTools handler, including name, description, and input schema (empty).
    { name: 'block_high_risk_users', description: 'Block users detected as high risk (MS.AAD.2.1v1)', inputSchema: { type: 'object', properties: {}, }, },
  • Input schema definition for the 'block_high_risk_users' tool (no parameters required).
    inputSchema: { type: 'object', properties: {}, },
  • Dispatch case in the CallToolRequest handler that routes to the blockHighRiskUsers method.
    case 'block_high_risk_users': return await this.blockHighRiskUsers();

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DynamicEndpoints/Automated-BOD-25-01-CISA-Microsoft-Policies-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server