get_sso_url
Generate a Single Sign-On URL for customer portal access using product details and customer account code, enabling quick authentication for license management.
Instructions
Get Single Sign-On URL for customer portal access
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customer_account_code | Yes | ||
| product | Yes | ||
| response_type | No | token |
Implementation Reference
- src/license-api-server.ts:703-727 (handler)The main handler function implementing the get_sso_url tool. It accepts product, customer_account_code, and optional response_type, constructs query parameters, calls the LicenseSpring API endpoint /api/v4/sso_url/, returns the JSON response or error message.}, async ({ product, customer_account_code, response_type }) => { try { const queryParams = new URLSearchParams({ product, customer_account_code, response_type, }); const response = await apiClient.get(`/api/v4/sso_url/?${queryParams}`); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2), }], }; } catch (error) { return { content: [{ type: 'text', text: `Error getting SSO URL: ${handleApiError(error)}`, }], isError: true, }; } });
- src/license-api-server.ts:698-702 (schema)Zod input schema validation for the get_sso_url tool parameters.inputSchema: { product: z.string().min(1, 'Product code is required'), customer_account_code: z.string().min(1, 'Customer account code is required'), response_type: z.string().optional().default('token'), },
- src/license-api-server.ts:695-727 (registration)Registration of the get_sso_url tool on the MCP server, including title, description, input schema, and inline handler function.server.registerTool('get_sso_url', { title: 'Get SSO URL', description: 'Get Single Sign-On URL for customer portal access', inputSchema: { product: z.string().min(1, 'Product code is required'), customer_account_code: z.string().min(1, 'Customer account code is required'), response_type: z.string().optional().default('token'), }, }, async ({ product, customer_account_code, response_type }) => { try { const queryParams = new URLSearchParams({ product, customer_account_code, response_type, }); const response = await apiClient.get(`/api/v4/sso_url/?${queryParams}`); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2), }], }; } catch (error) { return { content: [{ type: 'text', text: `Error getting SSO URL: ${handleApiError(error)}`, }], isError: true, }; } });