How to retrieve the front door id from a Microsoft CDN (classic)

I have created a Microsoft CDN (classic) in Azure and I need to retrieve the value of the X-Azure-Fdid.

This value is not displayed in the Microsoft Azure Portal nor it is returned in the Azure CLI reponse.

Portal:

Azure CLI:

az cdn profile list --resource-group redacted --output json
{
    "extendedProperties": {},
    "id": "/subscriptions/redacted/resourcegroups/redacted/providers/Microsoft.Cdn/profiles/testtest",
    "kind": "cdn",
    "location": "Global",
    "name": "testtest",
    "provisioningState": "Succeeded",
    "resourceGroup": "redacted",
    "resourceState": "Active",
    "sku": {
      "name": "Standard_Microsoft"
    },
    "tags": {},
    "type": "Microsoft.Cdn/profiles"
  }
az cdn endpoint list --profile-name testtest --resource-group op-1 --output json
[
  {
    "contentTypesToCompress": [
      "application/eot",
      "application/font",
      "application/font-sfnt",
      "application/javascript",
      "application/json",
      "application/opentype",
      "application/otf",
      "application/pkcs7-mime",
      "application/truetype",
      "application/ttf",
      "application/vnd.ms-fontobject",
      "application/xhtml+xml",
      "application/xml",
      "application/xml+rss",
      "application/x-font-opentype",
      "application/x-font-truetype",
      "application/x-font-ttf",
      "application/x-httpd-cgi",
      "application/x-javascript",
      "application/x-mpegurl",
      "application/x-opentype",
      "application/x-otf",
      "application/x-perl",
      "application/x-ttf",
      "font/eot",
      "font/ttf",
      "font/otf",
      "font/opentype",
      "image/svg+xml",
      "text/css",
      "text/csv",
      "text/html",
      "text/javascript",
      "text/js",
      "text/plain",
      "text/richtext",
      "text/tab-separated-values",
      "text/xml",
      "text/x-script",
      "text/x-component",
      "text/x-java-source"
    ],
    "customDomains": [],
    "geoFilters": [],
    "hostName": "testtesttest.azureedge.net",
    "id": "/redacted/resourcegroups/redacted/providers/Microsoft.Cdn/profiles/testtest/endpoints/testtesttest",
    "isCompressionEnabled": true,
    "isHttpAllowed": true,
    "isHttpsAllowed": true,
    "location": "Global",
    "name": "testtesttest",
    "originGroups": [],
    "originHostHeader": "test.com",
    "origins": [
      {
        "enabled": true,
        "hostName": "test.com",
        "httpPort": 80,
        "httpsPort": 443,
        "name": "test-com",
        "originHostHeader": "test.com",
        "priority": 1,
        "weight": 1000
      }
    ],
    "provisioningState": "Succeeded",
    "queryStringCachingBehavior": "BypassCaching",
    "resourceGroup": "redacted",
    "resourceState": "Running",
    "tags": {},
    "type": "Microsoft.Cdn/profiles/endpoints"
  }
]

The only way I was able to retrieve this ID so far was to look at the access logs on my origin server which is not ideal…

If this helps I created the CDN using Terraform and the following resource:

resource "azurerm_cdn_profile" "example" {
  name                = var.cdn_profile_name
  location            = "West Europe"
  resource_group_name = azurerm_resource_group.example.name
  sku                 = "Standard_Microsoft"
}

Note:

It appears that it is currently not possible to create an a Premium_AzureFrontDoor CDN using Terraform at the moment (see this GitHub issue: azurerm_cdn_profile SKU is not up to date).

As of today there does not appear to be a way to a classic Microsoft CDN’s XAzureFDID value outside the logs. I can confirm that the CDN does in fact have an assigned XAzureFDID.

I have a web app origin that is served both by a premium Front Door instance and a classic Microsoft CDN. When I look at the AppServiceIPSecAuditLogs I see the XAzureFDID column populated with a Front Door ID for all calls originating from Front Door. I also see a separate XAzureFDID for the calls originating from the Microsoft CDN.

In the logs for calls from Front Door:

In the logs for calls from the CDN:

Under the Microsoft.Cdn/profiles properties for the Front Door instance, via resources.azure.com:

Under the Microsoft.Cdn/profiles properties for the classic CDN:

3

To retrieve frontdoorId (X-Azure-Fdid), you can use following commands:

$afd = az network front-door show --name "your_frontdoor_name" --resource-group "frontdoor_resource_group_name"

$convertedafd = $afd | ConvertFrom-Json

for X-Azure-Fdid -->
$convertedafd.frontdoorId

Documentation for the frontdoor az cli – https://learn.microsoft.com/en-us/cli/azure/network/front-door?view=azure-cli-latest#az-network-front-door-show

2

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật