Issue trying to create a custom domain for my apim instance

Johan Lindahl 26 Reputation points
2022-02-04T10:49:51.547+00:00

I have a strange issue when trying to create a custom domain for my azure apim instance, the custom domain that i configured seems to be okey, but the error message i receive when trying to save referes to the default domain created when we setup the apim instance.

Any ideas on what could be wrong ?

See error message below

    "subStatus": {
        "value": "BadRequest",
        "localizedValue": "Bad Request (HTTP Status Code: 400)"
    },
    "properties": {
        "statusCode": "BadRequest",
        "serviceRequestId": null,
        "statusMessage": "{"error":{"code":"InvalidParameters",
                       "message":"Invalid parameter: CustomHostnameOwnershipCheckFailed. DNS name '<my-apim-service-name>.azure-api.net ' contains an invalid character."}}",
        "eventCategory": "Administrative",
        "message": "Microsoft.ApiManagement/service/write"
Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,768 questions
{count} votes

Accepted answer
  1. MayankBargali-MSFT 68,641 Reputation points
    2022-02-07T07:50:26.833+00:00

    @Johan Lindahl Thanks for reaching out. As per the error it looks like there was an issue with the DNS configuration value. Can you please confirm if you are not using the invalid character while setting the DNS configuration on your APIM instance. Looks like you might be using https:// or http:// or other invalid character on the configuration. Please share the configuration blade screenshot of your APIM instance so I can validate it.


0 additional answers

Sort by: Most helpful