Publishing a Web API
We can publish a Web API straight to the website that was provisioned when we created it using the normal website publish procedure; however, we need to pay particular attention to the publish settings:
Check Enable Organizational Authentication, enter the AD tenant Domain name, make sure to set the database connection string of the Azure database, and check Use this connection string at runtime (update destination web.config).
When we publish, we need to enter our AD tenant login credentials:
When the publish process is complete, we'll see our website has been created, but we also see a new application appear in the AD tenant workspace APPLICATIONS tab:
The ida:Audience
setting in the Web.config
file will also be updated to have the ID of our new Azure Web API application.