manage_intune_windows_apps
Deploy and manage Windows applications in Microsoft Intune, including Win32, Microsoft Store, and Office 365 apps, with assignment controls for enterprise environments.
Instructions
Manage Windows application deployment including Win32 apps, Microsoft Store apps, and Office 365 assignments.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Intune Windows app management action | |
| appId | No | App ID for app-specific operations | |
| appType | No | Windows app type | |
| name | No | Application name | |
| version | No | Application version | |
| assignmentGroups | No | Target groups for app deployment | |
| assignment | No | App assignment configuration | |
| appInfo | No | Application information |
Implementation Reference
- The core handler function implementing manage_intune_windows_apps tool. Handles Windows app operations in Intune including list, get, deploy, update, remove, and sync status via Microsoft Graph API endpoints under /deviceAppManagement/mobileApps.export async function handleIntuneWindowsApps( graphClient: Client, args: IntuneWindowsAppArgs ): Promise<{ content: { type: string; text: string }[] }> { let apiPath = ''; let result: any; switch (args.action) { case 'list': apiPath = '/deviceAppManagement/mobileApps'; let filter = ''; if (args.appType) { const odataType = args.appType === 'win32LobApp' ? '#microsoft.graph.win32LobApp' : args.appType === 'microsoftStoreForBusinessApp' ? '#microsoft.graph.microsoftStoreForBusinessApp' : args.appType === 'officeSuiteApp' ? '#microsoft.graph.officeSuiteApp' : args.appType === 'webApp' ? '#microsoft.graph.webApp' : args.appType === 'microsoftEdgeApp' ? '#microsoft.graph.microsoftEdgeApp' : ''; if (odataType) { filter = `@odata.type eq '${odataType}'`; } } if (filter) { apiPath += `?$filter=${filter}`; } result = await graphClient.api(apiPath).get(); break; case 'get': if (!args.appId) { throw new McpError(ErrorCode.InvalidParams, 'appId is required for get action'); } apiPath = `/deviceAppManagement/mobileApps/${args.appId}`; result = await graphClient.api(apiPath).get(); break; case 'deploy': if (!args.appId || !args.assignmentGroups) { throw new McpError(ErrorCode.InvalidParams, 'appId and assignmentGroups are required for deploy action'); } const assignments = args.assignmentGroups.map(groupId => ({ target: { '@odata.type': '#microsoft.graph.groupAssignmentTarget', groupId: groupId }, intent: args.assignment?.installIntent || 'available', settings: { '@odata.type': '#microsoft.graph.win32LobAppAssignmentSettings', notifications: 'showAll', restartSettings: null, installTimeSettings: null } })); apiPath = `/deviceAppManagement/mobileApps/${args.appId}/assign`; result = await graphClient.api(apiPath).post({ mobileAppAssignments: assignments }); break; case 'update': if (!args.appId) { throw new McpError(ErrorCode.InvalidParams, 'appId is required for update action'); } const updatePayload: any = {}; if (args.name) updatePayload.displayName = args.name; if (args.version) updatePayload.displayVersion = args.version; apiPath = `/deviceAppManagement/mobileApps/${args.appId}`; result = await graphClient.api(apiPath).patch(updatePayload); break; case 'remove': if (!args.appId) { throw new McpError(ErrorCode.InvalidParams, 'appId is required for remove action'); } apiPath = `/deviceAppManagement/mobileApps/${args.appId}`; result = await graphClient.api(apiPath).delete(); break; case 'sync_status': if (!args.appId) { throw new McpError(ErrorCode.InvalidParams, 'appId is required for sync_status action'); } // Get app installation status across devices apiPath = `/deviceAppManagement/mobileApps/${args.appId}/deviceStatuses`; result = await graphClient.api(apiPath).get(); break; default: throw new McpError(ErrorCode.InvalidParams, `Unknown action: ${args.action}`); } return { content: [ { type: 'text', text: `Windows App Management Result:\n${JSON.stringify(result, null, 2)}` } ] }; }
- src/tool-metadata.ts:159-162 (schema)Tool metadata definition including description, title, and annotations (readOnlyHint, destructiveHint, etc.) for the manage_intune_windows_apps tool.manage_intune_windows_apps: { description: "Manage Windows application deployment including Win32 apps, Microsoft Store apps, and Office 365 assignments.", title: "Intune Windows App Manager", annotations: { title: "Intune Windows App Manager", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true }
- src/types/intune-types.ts:814-837 (schema)TypeScript interface defining input parameters (IntuneWindowsAppArgs) for the handler function.export interface IntuneWindowsAppArgs { action: 'list' | 'get' | 'deploy' | 'update' | 'remove' | 'sync_status'; appId?: string; appType?: 'win32LobApp' | 'microsoftStoreForBusinessApp' | 'webApp' | 'officeSuiteApp' | 'microsoftEdgeApp'; name?: string; version?: string; assignmentGroups?: string[]; assignment?: { groupIds: string[]; installIntent: 'available' | 'required' | 'uninstall' | 'availableWithoutEnrollment'; deliveryOptimizationPriority?: 'notConfigured' | 'foreground'; }; appInfo?: { displayName: string; description?: string; publisher: string; fileName?: string; setupFilePath?: string; installCommandLine?: string; uninstallCommandLine?: string; minimumSupportedOperatingSystem?: string; packageFilePath?: string; }; }
- src/tool-definitions.ts:358-381 (schema)Zod schema (intuneWindowsAppSchema) for input validation and MCP tool discovery of manage_intune_windows_apps.export const intuneWindowsAppSchema = z.object({ action: z.enum(['list', 'get', 'deploy', 'update', 'remove', 'sync_status']).describe('Intune Windows app management action'), appId: z.string().optional().describe('App ID for app-specific operations'), appType: z.enum(['win32LobApp', 'microsoftStoreForBusinessApp', 'webApp', 'officeSuiteApp', 'microsoftEdgeApp']).optional().describe('Windows app type'), name: z.string().optional().describe('Application name'), version: z.string().optional().describe('Application version'), assignmentGroups: z.array(z.string()).optional().describe('Target groups for app deployment'), assignment: z.object({ groupIds: z.array(z.string()).describe('Target group IDs'), installIntent: z.enum(['available', 'required', 'uninstall', 'availableWithoutEnrollment']).describe('Installation intent'), deliveryOptimizationPriority: z.enum(['notConfigured', 'foreground']).optional().describe('Delivery optimization priority'), }).optional().describe('App assignment configuration'), appInfo: z.object({ displayName: z.string().describe('Application display name'), description: z.string().optional().describe('Application description'), publisher: z.string().describe('Application publisher'), fileName: z.string().optional().describe('Installation file name'), setupFilePath: z.string().optional().describe('Setup file path'), installCommandLine: z.string().optional().describe('Install command line'), uninstallCommandLine: z.string().optional().describe('Uninstall command line'), minimumSupportedOperatingSystem: z.string().optional().describe('Minimum OS version'), packageFilePath: z.string().optional().describe('Package file path'), }).optional().describe('Application information'), });
- src/prompts.ts:718-721 (helper)Example usage of manage_intune_windows_apps tool in device compliance analysis prompt.manage_intune_windows_apps { action: "list" } \`\`\`