update_dataverse_team
Modify team settings like name, description, administrator, or configuration properties for existing Dataverse teams without affecting team membership.
Instructions
Updates the properties and configuration of an existing team. Use this to modify team settings like name, description, administrator, or other team properties without changing team membership.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| administratorId | No | New administrator user ID | |
| azureActiveDirectoryObjectId | No | Azure AD Object ID for the team | |
| delegatedAuthorizationId | No | Delegated authorization context for the team | |
| description | No | New description of the team | |
| emailAddress | No | Email address for the team | |
| membershipType | No | Membership type: 0=Members and guests, 1=Members, 2=Owners, 3=Guests | |
| name | No | New name of the team | |
| queueId | No | Default queue ID for the team | |
| teamId | Yes | ID of the team to update | |
| teamTemplateId | No | Team template ID to associate with the team | |
| teamType | No | Team type: 0=Owner, 1=Access, 2=Security Group, 3=Office Group | |
| transactionCurrencyId | No | Currency ID associated with the team | |
| yomiName | No | Pronunciation of the team name in phonetic characters |
Implementation Reference
- src/tools/team-tools.ts:179-229 (handler)Executes the tool logic by constructing update data from params and patching the Dataverse teams endpoint via the client.async (params) => { try { const updateData: any = {}; if (params.name !== undefined) updateData.name = params.name; if (params.description !== undefined) updateData.description = params.description; if (params.teamType !== undefined) updateData.teamtype = parseInt(params.teamType); if (params.membershipType !== undefined) updateData.membershiptype = parseInt(params.membershipType); if (params.emailAddress !== undefined) updateData.emailaddress = params.emailAddress; if (params.yomiName !== undefined) updateData.yominame = params.yomiName; if (params.azureActiveDirectoryObjectId !== undefined) updateData.azureactivedirectoryobjectid = params.azureActiveDirectoryObjectId; // Set optional relationships if (params.administratorId !== undefined) { updateData['administratorid@odata.bind'] = `/systemusers(${params.administratorId})`; } if (params.queueId !== undefined) { updateData['queueid@odata.bind'] = params.queueId ? `/queues(${params.queueId})` : null; } if (params.teamTemplateId !== undefined) { updateData['teamtemplateid@odata.bind'] = params.teamTemplateId ? `/teamtemplates(${params.teamTemplateId})` : null; } if (params.delegatedAuthorizationId !== undefined) { updateData['delegatedauthorizationid@odata.bind'] = params.delegatedAuthorizationId ? `/delegatedauthorizations(${params.delegatedAuthorizationId})` : null; } if (params.transactionCurrencyId !== undefined) { updateData['transactioncurrencyid@odata.bind'] = params.transactionCurrencyId ? `/transactioncurrencies(${params.transactionCurrencyId})` : null; } await client.patch(`teams(${params.teamId})`, updateData); return { content: [ { type: "text", text: `Successfully updated team.` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error updating team: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } }
- src/tools/team-tools.ts:163-177 (schema)Zod input schema defining parameters for updating a Dataverse team, including optional fields for various team properties.inputSchema: { teamId: z.string().describe("ID of the team to update"), name: z.string().max(160).optional().describe("New name of the team"), description: z.string().max(2000).optional().describe("New description of the team"), teamType: z.enum(['0', '1', '2', '3']).optional().describe("Team type: 0=Owner, 1=Access, 2=Security Group, 3=Office Group"), membershipType: z.enum(['0', '1', '2', '3']).optional().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"), administratorId: z.string().optional().describe("New administrator user ID"), 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") }
- src/tools/team-tools.ts:157-231 (registration)Registers the 'update_dataverse_team' tool with the MCP server using server.registerTool, providing title, description, input schema, and handler function.export function updateTeamTool(server: McpServer, client: DataverseClient) { server.registerTool( "update_dataverse_team", { title: "Update Dataverse Team", description: "Updates the properties and configuration of an existing team. Use this to modify team settings like name, description, administrator, or other team properties without changing team membership.", inputSchema: { teamId: z.string().describe("ID of the team to update"), name: z.string().max(160).optional().describe("New name of the team"), description: z.string().max(2000).optional().describe("New description of the team"), teamType: z.enum(['0', '1', '2', '3']).optional().describe("Team type: 0=Owner, 1=Access, 2=Security Group, 3=Office Group"), membershipType: z.enum(['0', '1', '2', '3']).optional().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"), administratorId: z.string().optional().describe("New administrator user ID"), 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 updateData: any = {}; if (params.name !== undefined) updateData.name = params.name; if (params.description !== undefined) updateData.description = params.description; if (params.teamType !== undefined) updateData.teamtype = parseInt(params.teamType); if (params.membershipType !== undefined) updateData.membershiptype = parseInt(params.membershipType); if (params.emailAddress !== undefined) updateData.emailaddress = params.emailAddress; if (params.yomiName !== undefined) updateData.yominame = params.yomiName; if (params.azureActiveDirectoryObjectId !== undefined) updateData.azureactivedirectoryobjectid = params.azureActiveDirectoryObjectId; // Set optional relationships if (params.administratorId !== undefined) { updateData['administratorid@odata.bind'] = `/systemusers(${params.administratorId})`; } if (params.queueId !== undefined) { updateData['queueid@odata.bind'] = params.queueId ? `/queues(${params.queueId})` : null; } if (params.teamTemplateId !== undefined) { updateData['teamtemplateid@odata.bind'] = params.teamTemplateId ? `/teamtemplates(${params.teamTemplateId})` : null; } if (params.delegatedAuthorizationId !== undefined) { updateData['delegatedauthorizationid@odata.bind'] = params.delegatedAuthorizationId ? `/delegatedauthorizations(${params.delegatedAuthorizationId})` : null; } if (params.transactionCurrencyId !== undefined) { updateData['transactioncurrencyid@odata.bind'] = params.transactionCurrencyId ? `/transactioncurrencies(${params.transactionCurrencyId})` : null; } await client.patch(`teams(${params.teamId})`, updateData); return { content: [ { type: "text", text: `Successfully updated team.` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error updating team: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } ); }