This tutorial showed us a quick way to deploy and configure Captive Portal of Web Safety application to integrate with Microsoft Azure Active Directory. Captive Portal supports other types of integrations too - for example Active Directory integration on premises. Be sure to look at the article at Captive Portal Authentication for more information on Captive Portal.
The following notes are worth mentioning.
The proxy is deployed in the cloud, but connections from a browser to cloud proxy is done in clear text. To better protect confidentiality of the connections it is advisable to use VPN connection to the proxy. Search for Site-to-Site VPN or Hybrid-Cloud tutorials for Microsoft Azure.