Verify your own domain's in Azure with ease

Problem this snippet solves:

In case you want to verify your domain ownership in a fast and easy way you can do this with your BIG-IP directly!

This example shows it for Azure but the code of course can be modified for other clouds like GCP etc. as well.

How to use this snippet:

Just simply add a new iRule with following code to your virtual server that serves the corresponding FQDN for the domain to verified.

Tested with TMOS 15.x as well.

Just take your application ID form Azure from your "Application Registration" and replace the part <AZURE Application (client) ID> with it.

What about verifying 1000nds of domains?

(googled: azure api call domain verification) https://docs.microsoft.com/en-us/graph/api/domain-verify?view=graph-rest-1.0&tabs=http

So, you could easily spin-off virtual servers via API calls for each domain to verify them each automatically with parameters for the corresponding iRule as well.

Code :

when HTTP_REQUEST {
    if { [HTTP::uri] contains ".well-known/microsoft-identity-association.json" } {
       
        HTTP::respond 200 content {
            {
                "associatedApplications": [
                    {
                        "applicationId": ""
                    }
                ]
            }
        } "Content-Type" "application/json"
    }
}

Tested this on version:

13.0
Published Dec 06, 2019
Version 1.0

Was this article helpful?

No CommentsBe the first to comment