Book Image

Learning Microsoft Azure

By : Geoff Webber Cross, Geoff Webber-Cross
Book Image

Learning Microsoft Azure

By: Geoff Webber Cross, Geoff Webber-Cross

Overview of this book

Table of Contents (19 chapters)
Learning Microsoft Azure
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building a Web API service


We'll create a new web project for the production system that hosts the Web API HTTP service and the SignalR hub. Since we already have Azure AD authentication in place across the other internal systems, we'll configure this website to use Azure AD authentication, too.

If you've not already done so, read the Adding Azure AD single sign-on to a website section in Chapter 5, Building Azure MVC Websites, which covers creating an Azure AD, which is a prerequisite to creating a website with Azure AD integration.

Creating a Web API project

In the following procedure, we'll create a web project in Visual Studio with a Web API template and configure it to use Azure AD authentication:

  1. Add a new web project to your solution, I've called mine ManagementWebApi, select the Web API template and make sure Host in the cloud is checked:

  2. Click on Change Authentication, then select Organizational Accounts, fill in the Azure AD Domain field, and click on OK:

  3. Sign in using the new AD user...