disable_password_expiry
Disable password expiration policies to maintain static passwords without periodic changes, implementing Microsoft 365 compliance requirements.
Instructions
Disable password expiration (MS.AAD.6.1v1)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- cisa-m365/src/index.ts:759-785 (handler)The handler function that implements the tool logic by patching the Microsoft Graph API password policy to disable expiration (set neverExpire to true).private async disablePasswordExpiry() { try { // Configure password policy using Microsoft Graph API await this.graphClient .api('/policies/passwordPolicy') .patch({ passwordExpirationPolicy: { passwordExpirationDays: 0, neverExpire: true, }, }); return { content: [ { type: 'text', text: 'Password expiration disabled successfully', }, ], }; } catch (error: unknown) { throw new McpError( ErrorCode.InternalError, `Failed to disable password expiry: ${error instanceof Error ? error.message : 'Unknown error'}` ); } }
- cisa-m365/src/index.ts:347-348 (registration)Dispatch case in the CallToolRequest handler that routes calls to the disablePasswordExpiry method.case 'disable_password_expiry': return await this.disablePasswordExpiry();
- cisa-m365/src/index.ts:216-223 (registration)Tool registration in ListToolsResponse, including name, description, and input schema (empty object).{ name: 'disable_password_expiry', description: 'Disable password expiration (MS.AAD.6.1v1)', inputSchema: { type: 'object', properties: {}, }, },
- cisa-m365/src/index.ts:219-222 (schema)Input schema definition for the tool (accepts no parameters).inputSchema: { type: 'object', properties: {}, },