Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

delete_dataverse_role

Remove security roles from Microsoft Dataverse to maintain clean access control. This permanent deletion requires verifying the role is not currently assigned to users or teams.

Instructions

Permanently deletes a security role from Dataverse. WARNING: This action cannot be undone and will fail if the role is assigned to any users or teams. Ensure the role is not in use before deletion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleIdYesID of the role to delete

Implementation Reference

  • The core handler function that executes the tool by deleting the Dataverse security role with the given roleId using the DataverseClient.
    async (params) => { try { await client.delete(`roles(${params.roleId})`); return { content: [ { type: "text", text: `Successfully deleted security role.` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error deleting security role: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } );
  • The input schema and metadata for the tool, defining the required 'roleId' parameter of type string.
    { title: "Delete Dataverse Security Role", description: "Permanently deletes a security role from Dataverse. WARNING: This action cannot be undone and will fail if the role is assigned to any users or teams. Ensure the role is not in use before deletion.", inputSchema: { roleId: z.string().describe("ID of the role to delete") } },
  • The server.registerTool call within deleteRoleTool function that registers the tool with name 'delete_dataverse_role'.
    server.registerTool( "delete_dataverse_role", { title: "Delete Dataverse Security Role", description: "Permanently deletes a security role from Dataverse. WARNING: This action cannot be undone and will fail if the role is assigned to any users or teams. Ensure the role is not in use before deletion.", inputSchema: { roleId: z.string().describe("ID of the role to delete") } }, async (params) => { try { await client.delete(`roles(${params.roleId})`); return { content: [ { type: "text", text: `Successfully deleted security role.` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error deleting security role: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } ); }
  • src/index.ts:183-183 (registration)
    The invocation of deleteRoleTool which triggers the tool registration on the MCP server.
    deleteRoleTool(server, dataverseClient);

Other Tools

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/mwhesse/mcp-dataverse'

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