Connect to On-prem SharePoint site using Azure Hybrid Connection Manager
In this post we will see how to configure Hybrid Connection Manager and make REST API and CSOM calls to a SharePoint on-prem farm to upload documents to a document library.
Hybrid Connection Manager Overall Message flow
Please find the overall message flow diagram wherein a client application makes a call the Azure API App to upload document to an on-prem SharePoint site collection.
Step 1:
Within the Azure APIApp search for Networking and select Hybrid Connections and click on Add Hybrid connection as shown in the figure below

Step 2:
Click on Create new hybrid connection as shown below. Now we are adding a Hybrid connection to intranet SharePoint site over https.Please note Endpoint Host should be exactly the same as in the url with fully qualified domain and for https the endpoint port should be 443. Only Endpoint Host name should be added and connection cannot be established with IP address. For SQL please make sure to ad the fully qualified name of the SQL Server with Endpoint port as 1433

Step 4:
After the hybrid connection is successfully added the hybrid connection will be displayed in the list as shown below.

Step 5:
Now to configure hybrid connection within the on-prem server please make sure to download the hybrid connection manager as shown in the figure below.

Step 6:
Now we need to install the connection in the on-prem VM. Please make sure the SharePoint site is browsable within the VM.After installing the Hybrid Connection Manager setup in the on-prem VM launch the Hybrid Connection Manager UI. And then click on Add a new Hybrid Connection as highlighted below

Step 7:
Sign to azure using the azure account and select the appropriate subscription where the Hybrid Connection has been setup.

Step 8:
Select the hybrid connection to be added and click on save button to add the connection

Step 9:
Status of the connection should be Connected both in Azure and Hybrid Connect Manager UI within onprem server

Now get back to API App in Azure and make sure to add the appropriate code to connect to SharePoint..
Conclusion:
In this post we have learnt how to configure hybrid connection manager in Azure.Feel free to send any comments or clarifications to aswinbhaskaran@abtechnet.com