disable_password_expiry
Disable password expiration policies to maintain consistent access without periodic password changes, addressing MS.AAD.6.1v1 compliance requirements.
Instructions
Disable password expiration (MS.AAD.6.1v1)
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "disable_password_expiry"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- cisa-m365/src/index.ts:759-785 (handler)The main handler function for the 'disable_password_expiry' tool. It uses the Microsoft Graph API to patch the password policy, setting passwords to never expire.
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)The switch 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)Registers the tool in the ListTools response, 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)Defines the input schema for the tool as an empty object (no parameters required).
inputSchema: { type: 'object', properties: {}, },