Add Custom Domain to WebApp via API

Stefano Ghisaura 1 Reputation point
2020-12-09T16:27:26.237+00:00

Hi,
I'd need to add a custom domain to a WebApp hosted on Azure Germany and I should do it from another API backend. I found a solution, but I'd need to use a PowerShell command which I cannot run from the API backend since it's hosted on Azure as well. Is there any alternative maybe using REST API?

Thanks in advance,
Stefano

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,865 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Cristian SPIRIDON 4,471 Reputation points
    2020-12-09T20:41:19.917+00:00

    You can use Graph API to update a WebApp. It is in beta though, not suited for production use.

    Hope this helps.

    0 comments No comments

  2. Stefano Ghisaura 1 Reputation point
    2020-12-09T20:55:38.863+00:00

    Thank you @Cristian SPIRIDON , but it seems the custom domains are not (yet?) supported on Graph API. Also, considering Azure Germany is going to be dismissed within 1 year and the Graph API are in beta in Azure Global, I guess they will be never available on Azure Germany.

    Thank you anyway,
    Stefano

    0 comments No comments

  3. brtrach 251 Reputation points
    2020-12-11T04:22:54.15+00:00

    The below links allow you to use REST API to update either 1st party (Azure purchased certs) or 3rd party (such as GoDaddy or whomever) certs.

    1st party: https://learn.microsoft.com/en-us/rest/api/appservice/appservicecertificateorders
    3rd party: https://learn.microsoft.com/en-us/rest/api/appservice/certificates
    Azure App Service Rest APIs (if you're interested in more than just certificate REST APIs for app service): https://learn.microsoft.com/en-us/rest/api/appservice/

    Let me know if this doesn't address your question, otherwise please mark this as the answer to help guide others who have the same question in the future.

    0 comments No comments