Skip to main content
Glama
mwhesse

Dataverse MCP Server

by mwhesse

create_dataverse_team

Create new teams in Dataverse to organize users and manage permissions. Establish owner teams for record ownership or access teams for sharing records, grouping users with similar access requirements.

Instructions

Creates a new team in Dataverse for organizing users and managing permissions. Teams can be owner teams (for record ownership) or access teams (for sharing records). Use this to establish groups of users who work together and need similar access levels.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
administratorIdYesUser ID of the team administrator
azureActiveDirectoryObjectIdNoAzure AD Object ID for the team
businessUnitIdNoBusiness unit ID to associate the team with (defaults to root business unit)
delegatedAuthorizationIdNoDelegated authorization context for the team
descriptionNoDescription of the team
emailAddressNoEmail address for the team
membershipTypeNoMembership type: 0=Members and guests, 1=Members, 2=Owners, 3=Guests0
nameYesName of the team
queueIdNoDefault queue ID for the team
teamTemplateIdNoTeam template ID to associate with the team
teamTypeNoTeam type: 0=Owner, 1=Access, 2=Security Group, 3=Office Group0
transactionCurrencyIdNoCurrency ID associated with the team
yomiNameNoPronunciation of the team name in phonetic characters

Implementation Reference

  • The core handler function that executes the tool logic: constructs team creation payload with OData bindings for relationships, fetches root business unit if needed, posts to /teams endpoint, and returns success/error response.
    async (params) => { try { const teamData: any = { name: params.name, description: params.description, teamtype: parseInt(params.teamType), membershiptype: parseInt(params.membershipType), emailaddress: params.emailAddress, yominame: params.yomiName, azureactivedirectoryobjectid: params.azureActiveDirectoryObjectId }; // Set administrator teamData['administratorid@odata.bind'] = `/systemusers(${params.administratorId})`; // Set business unit (default to root if not provided) if (params.businessUnitId) { teamData['businessunitid@odata.bind'] = `/businessunits(${params.businessUnitId})`; } else { // Get the root business unit const businessUnits = await client.get('businessunits?$filter=parentbusinessunitid eq null&$select=businessunitid'); if (businessUnits.value && businessUnits.value.length > 0) { teamData['businessunitid@odata.bind'] = `/businessunits(${businessUnits.value[0].businessunitid})`; } } // Set optional relationships if (params.queueId) { teamData['queueid@odata.bind'] = `/queues(${params.queueId})`; } if (params.teamTemplateId) { teamData['teamtemplateid@odata.bind'] = `/teamtemplates(${params.teamTemplateId})`; } if (params.delegatedAuthorizationId) { teamData['delegatedauthorizationid@odata.bind'] = `/delegatedauthorizations(${params.delegatedAuthorizationId})`; } if (params.transactionCurrencyId) { teamData['transactioncurrencyid@odata.bind'] = `/transactioncurrencies(${params.transactionCurrencyId})`; } const response = await client.post('teams', teamData); return { content: [ { type: "text", text: `Successfully created team '${params.name}'.\n\nTeam created successfully.\n\nResponse: ${JSON.stringify(response, null, 2)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error creating team: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } }
  • Tool metadata (title, description) and Zod-based inputSchema defining all parameters for creating a Dataverse team, including required name/administratorId and optional fields with constraints.
    { title: "Create Dataverse Team", description: "Creates a new team in Dataverse for organizing users and managing permissions. Teams can be owner teams (for record ownership) or access teams (for sharing records). Use this to establish groups of users who work together and need similar access levels.", inputSchema: { name: z.string().max(160).describe("Name of the team"), description: z.string().max(2000).optional().describe("Description of the team"), businessUnitId: z.string().optional().describe("Business unit ID to associate the team with (defaults to root business unit)"), administratorId: z.string().describe("User ID of the team administrator"), teamType: z.enum(['0', '1', '2', '3']).default('0').describe("Team type: 0=Owner, 1=Access, 2=Security Group, 3=Office Group"), membershipType: z.enum(['0', '1', '2', '3']).default('0').describe("Membership type: 0=Members and guests, 1=Members, 2=Owners, 3=Guests"), emailAddress: z.string().max(100).optional().describe("Email address for the team"), yomiName: z.string().max(160).optional().describe("Pronunciation of the team name in phonetic characters"), azureActiveDirectoryObjectId: z.string().optional().describe("Azure AD Object ID for the team"), queueId: z.string().optional().describe("Default queue ID for the team"), teamTemplateId: z.string().optional().describe("Team template ID to associate with the team"), delegatedAuthorizationId: z.string().optional().describe("Delegated authorization context for the team"), transactionCurrencyId: z.string().optional().describe("Currency ID associated with the team") } },
  • The exported createTeamTool function that performs the server.registerTool call to register the 'create_dataverse_team' tool with its schema and handler.
    export function createTeamTool(server: McpServer, client: DataverseClient) { server.registerTool( "create_dataverse_team", { title: "Create Dataverse Team", description: "Creates a new team in Dataverse for organizing users and managing permissions. Teams can be owner teams (for record ownership) or access teams (for sharing records). Use this to establish groups of users who work together and need similar access levels.", inputSchema: { name: z.string().max(160).describe("Name of the team"), description: z.string().max(2000).optional().describe("Description of the team"), businessUnitId: z.string().optional().describe("Business unit ID to associate the team with (defaults to root business unit)"), administratorId: z.string().describe("User ID of the team administrator"), teamType: z.enum(['0', '1', '2', '3']).default('0').describe("Team type: 0=Owner, 1=Access, 2=Security Group, 3=Office Group"), membershipType: z.enum(['0', '1', '2', '3']).default('0').describe("Membership type: 0=Members and guests, 1=Members, 2=Owners, 3=Guests"), emailAddress: z.string().max(100).optional().describe("Email address for the team"), yomiName: z.string().max(160).optional().describe("Pronunciation of the team name in phonetic characters"), azureActiveDirectoryObjectId: z.string().optional().describe("Azure AD Object ID for the team"), queueId: z.string().optional().describe("Default queue ID for the team"), teamTemplateId: z.string().optional().describe("Team template ID to associate with the team"), delegatedAuthorizationId: z.string().optional().describe("Delegated authorization context for the team"), transactionCurrencyId: z.string().optional().describe("Currency ID associated with the team") } }, async (params) => { try { const teamData: any = { name: params.name, description: params.description, teamtype: parseInt(params.teamType), membershiptype: parseInt(params.membershipType), emailaddress: params.emailAddress, yominame: params.yomiName, azureactivedirectoryobjectid: params.azureActiveDirectoryObjectId }; // Set administrator teamData['administratorid@odata.bind'] = `/systemusers(${params.administratorId})`; // Set business unit (default to root if not provided) if (params.businessUnitId) { teamData['businessunitid@odata.bind'] = `/businessunits(${params.businessUnitId})`; } else { // Get the root business unit const businessUnits = await client.get('businessunits?$filter=parentbusinessunitid eq null&$select=businessunitid'); if (businessUnits.value && businessUnits.value.length > 0) { teamData['businessunitid@odata.bind'] = `/businessunits(${businessUnits.value[0].businessunitid})`; } } // Set optional relationships if (params.queueId) { teamData['queueid@odata.bind'] = `/queues(${params.queueId})`; } if (params.teamTemplateId) { teamData['teamtemplateid@odata.bind'] = `/teamtemplates(${params.teamTemplateId})`; } if (params.delegatedAuthorizationId) { teamData['delegatedauthorizationid@odata.bind'] = `/delegatedauthorizations(${params.delegatedAuthorizationId})`; } if (params.transactionCurrencyId) { teamData['transactioncurrencyid@odata.bind'] = `/transactioncurrencies(${params.transactionCurrencyId})`; } const response = await client.post('teams', teamData); return { content: [ { type: "text", text: `Successfully created team '${params.name}'.\n\nTeam created successfully.\n\nResponse: ${JSON.stringify(response, null, 2)}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error creating team: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } ); }
  • src/index.ts:199-199 (registration)
    Invocation of createTeamTool in the main index.ts to register the tool during server initialization.
    createTeamTool(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