n8n-io/n8n · error · NodeOperationError
Azure AI Search endpoint is missing or invalid
Error message
Azure AI Search endpoint is missing or invalid
What it means
getValidatedCredentials throws this NodeOperationError when the Azure AI Search credential's 'endpoint' field is missing or not a string. The Search Endpoint URL (https://<service>.search.windows.net) is mandatory to build the SearchClient.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreAzureAISearch/VectorStoreAzureAISearch.node.ts:179
defaultValue?: T,
): T | undefined {
const options: IDataObject = context.getNodeParameter('options', itemIndex, {});
return options[name] !== undefined ? (options[name] as T) : defaultValue;
}
interface ValidatedCredentials {
endpoint: string;
apiKey: string;
}
async function getValidatedCredentials(
context: IFunctionsContext,
itemIndex: number,
): Promise<ValidatedCredentials> {
const credentials = await context.getCredentials(AZURE_AI_SEARCH_CREDENTIALS);
if (!credentials.endpoint || typeof credentials.endpoint !== 'string') {
throw new NodeOperationError(
context.getNode(),
'Azure AI Search endpoint is missing or invalid',
{ itemIndex },
);
}
if (!credentials.apiKey || typeof credentials.apiKey !== 'string') {
throw new NodeOperationError(context.getNode(), 'API Key is required for authentication', {
itemIndex,
});
}
return {
endpoint: credentials.endpoint,
apiKey: credentials.apiKey,
};
}
View on GitHub (pinned to 5ac6606e81)
Solutions
- Open the Azure AI Search credential and set the endpoint to the full URL (https://<your-service>.search.windows.net).
- Re-select the credential in the node to refresh the reference.
- Verify the credential is saved (not just opened) after entering the endpoint.
Defensive patterns
Strategy: validation
Validate before calling
const cred = await context.getCredentials(AZURE_AI_SEARCH_CREDENTIALS);
if (typeof cred?.endpoint !== 'string' || cred.endpoint.trim() === '') {
throw new Error('Azure AI Search credential is missing a valid endpoint URL.');
} Type guard
function hasValidEndpoint(c: unknown): c is { endpoint: string } {
return typeof c === 'object' && c !== null &&
typeof (c as any).endpoint === 'string' && (c as any).endpoint.startsWith('https://');
} Prevention
- Validate the endpoint URL format when creating the credential.
- Pair endpoint + apiKey validation in a single helper used by every entry point.
When it happens
Trigger: context.getCredentials(AZURE_AI_SEARCH_CREDENTIALS) returns an object where 'endpoint' is undefined, empty, or not of type 'string'.
Common situations: The credential was created but the endpoint field left blank; the credential was partially filled and saved; the credential referenced by the node was deleted or replaced with an empty one.
Related errors
- API Key is required for authentication
- Invalid filter operator "${operator}" for key "${key}". Supp
- filterableKeys must contain at least one key
- VectorStore "${this.name}" requires a description — set it v
- VectorStore "${this.name}" requires a backend — set it via .
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/e8925d6abca8089b.
Report an issue: GitHub.