Error codes: Common error codes when using IMDS to retrieve load balancer information

This article describes common deployment errors and how to resolve those errors while using the Azure Instance Metadata Service (IMDS).

Error codes

Error code Error message Details and mitigation
400 Missing required parameter "<ParameterName>". Please fix the request and retry. The error code indicates a missing parameter.
For more information on adding the missing parameter, see How to retrieve load balancer metadata using the Azure Instance Metadata Service (IMDS).
400 Parameter value is not allowed, or parameter value "<ParameterValue>" is not allowed for parameter "ParameterName". Please fix the request and retry. The error code indicates that the request format is not configured properly.
For more information, see How to retrieve load balancer metadata using the Azure Instance Metadata Service (IMDS) to fix the request body and issue a retry.
400 Unexpected request. Please check the query parameters and retry. The error code indicates that the request format is not configured properly.
For more information, see How to retrieve load balancer metadata using the Azure Instance Metadata Service (IMDS) to fix the request body and issue a retry.
404 No load balancer metadata is found. Please check if your VM is using any non-basic SKU load balancer and retry later. The error code indicates that your virtual machine isn't associated with a load balancer or the load balancer is basic SKU instead of standard.
For more information, see Quickstart: Create a public load balancer to load balance VMs using the Azure portal to deploy a standard load balancer.
404 API is not found: Path = "<UrlPath>", Method = "<Method>" The error code indicates a misconfiguration of the path.
For more information, see How to retrieve load balancer metadata using the Azure Instance Metadata Service (IMDS) to fix the request body and issue a retry.
405 Http method is not allowed: Path = "<UrlPath>", Method = "<Method>" The error code indicates an unsupported HTTP verb.
For more information, see Azure Instance Metadata Service (IMDS) for supported verbs.
429 Too many requests The error code indicates a rate limit.
For more information on rate limiting, see Azure Instance Metadata Service (IMDS).
400 Request body is larger than MaxBodyLength: … The error code indicates a request larger than the MaxBodyLength.
For more information on body length, see How to retrieve load balancer metadata using the Azure Instance Metadata Service (IMDS).
400 Parameter key length is larger than MaxParameterKeyLength: … The error code indicates a parameter key length larger than the MaxParameterKeyLength.
For more information on body length, see How to retrieve load balancer metadata using the Azure Instance Metadata Service (IMDS).
400 Parameter value length is larger than MaxParameterValueLength: … The error code indicates a parameter key length larger than the MaxParameterValueLength.
For more information on value length, see How to retrieve load balancer metadata using the Azure Instance Metadata Service (IMDS).
400 Parameter header value length is larger than MaxHeaderValueLength: … The error code indicates a parameter header value length larger than the MaxHeaderValueLength.
For more information on value length, see How to retrieve load balancer metadata using the Azure Instance Metadata Service (IMDS).
404 Load Balancer metadata API is not available right now. Please retry later The error code indicates the API could be provisioning. Try your request later.
404 /metadata/loadbalancer is not currently available The error code indicates the API is in the progress of enablement. Try your request later.
503 Internal service unavailable. Please retry later The error code indicates the API is temporarily unavailable. Try your request later.

Next steps

Learn more about Azure Instance Metadata Service