How to map URL path-based rules in application gateway for your Azure web app service

If you want to redirect users’ requests to different Azure web app service behind Azure application Gateway via URL path-based rules ,you may need some extra settings , this doc will guide you how to map it . Prerequisites Azure Subscription . Existing Azure web apps. New created Azure application gateway. Scenario In this demo ,I have two web apps : http://testweba1.azurewebsites.net/first/ (we call it app1)and http://testweba2.azurewebsites.net/second/ (we call it  app2)and I created a new App GW ip : 13.76.3.134 , a sub domain record: pathtest.devtest.tk assigned to this IP. So I’ll demonstrate how to map app gw to implement the requesting route... Read more

How to use REST API to assign CSP subscription roles to new created CSP customer .

As we all know, as a CSP direct partner, we can create a customer with a CSP Azure subscription .However due to the CSP internal mechanism, The customer has no access to the CSP Azure subscription. CSP partners should logon to the Azure portal and assign CSP Azure subscription roles to the customer manually and then the customer is enable to access the CSP Azure subscription we created. Yes, doing some actions manually is not so convenient for us. So this blog mainly provides a way to assign CSP Azure subscription roles to CSP customers via REST API so that... Read more

Why fetching VMs in a subscription via REST API misses some VMs

Some customers got the issue that the amount  of Azure VMs you retrieved using  REST API and PowerShell is different  . Because when you try to fetch VMs via REST API and amount of VMs reaches the page size limits . The VMs will be divided into several pages . Example This is the script that I use to fetch the VMs via REST API without considering the paging: #get the access token $body=@{ grant_type="client_credentials" resource="https://management.core.windows.net/" client_id="your_client_id" client_secret="your_client_secret" } $tokenResponse=Invoke-RestMethod -Uri https://login.microsoftonline.com/your_tenant_id/oauth2/token -Method Post -Body $body $access_token=$tokenResponse.access_token # Get subscription ID $header =@{ "Content-Type"="application/json" "Authorization"="Bearer $access_token" } $uri1 = "https://management.azure.com/subscriptions?api-version=2016-06-01" $subscriptions = Invoke-RestMethod -Uri $Uri1 -Method Get... Read more

Certificate between IoT hub and devices connection

There are a lot of questions from partners about certificate issues during the TLS connection between IoT devices and IoT hub. So here I write this article to reveal something that you need to know when you are trying to connect your IoT devices to Azure IoT hub. IoT Hub requires all device communication to be secured using TLS/SSL (hence, IoT Hub doesn’t support non-secure connections over port 1883). The supported TLS version is TLS 1.2, TLS 1.1 and TLS 1.0, in this order. Support for TLS 1.0 is provided for backward compatibility only. It is recommended to use TLS... Read more

How to upload a blob to azure storage by Rest API

Microsoft provides quite a few SDKs for Azure storage service, which make you quite easy to access azure storage programmatically.  But in some special cases, you still need to access Azure storage using REST API. In this article, I will talk about how to use Azure Storage REST API to implement a common user scenario. I will create a container on azure storage, upload a file and finally delete the file by Rest API.  To make it easier, I use php to construct the request and test it via Curl. Prerequisite: Before you get started, make sure that you have set up your development environment: An... Read more