Skip to content

Commit 062dd84

Browse files
author
Tiago Brenck
committed
Steps on how to deploy the sample on Azure
1 parent 7a67374 commit 062dd84

File tree

3 files changed

+59
-3
lines changed

3 files changed

+59
-3
lines changed

2-WebApp-graph-user/2-2-TokenCache/AppCreationScripts/AppCreationScripts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Registering the Azure Active Directory applications and updating the configuration files for this sample using PowerShell scripts
1+
# Registering the sample apps with Microsoft Identity Platform and updating the configuration files using PowerShell scripts
22

33
## Overview
44

@@ -9,7 +9,7 @@
99
```PowerShell
1010
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
1111
```
12-
1. Run the script to create your Azure AD application and configure the code of the sample application accordinly. (Other ways of running the scripts are described below)
12+
1. Run the script to create your Azure AD application and configure the code of the sample application accordingly. (Other ways of running the scripts are described below)
1313
```PowerShell
1414
.\AppCreationScripts\Configure.ps1
1515
```

6-Deploy-to-Azure/Placeholder.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

6-Deploy-to-Azure/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
## How to deploy this sample to Azure
2+
3+
This project has one WebApp / Web API projects. To deploy them to Azure Web Sites, you'll need, for each one, to:
4+
5+
- create an Azure Web Site
6+
- publish the Web App / Web APIs to the web site, and
7+
- update its client(s) to call the web site instead of IIS Express.
8+
9+
### Create and publish the `WebApp-OpenIDConnect-DotNet-code-v2` to an Azure Web Site
10+
11+
1. Sign in to the [Azure portal](https://portal.azure.com).
12+
1. Click `Create a resource` in the top left-hand corner, select **Web** --> **Web App**, and give your web site a name, for example, `WebApp-OpenIDConnect-DotNet-code-v2-contoso.azurewebsites.net`.
13+
1. Thereafter select the `Subscription`, `Resource Group`, `App service plan and Location`. `OS` will be **Windows** and `Publish` will be **Code**.
14+
1. Click `Create` and wait for the App Service to be created.
15+
1. Once you get the `Deployment succeeded` notification, then click on `Go to resource` to navigate to the newly created App service.
16+
17+
### If your sample uses **SQL Server**, please follow these steps
18+
19+
1. The following steps provide instructions to create a Sql database that the sample needs. If you already have a Sql Server and database present and a connection string available, skip the steps till we ask you to provide the connections string in the `Application Settings`.
20+
1. Click `Create a resource` in the top left-hand corner again, select **Databases** --> **SQL Database**, to create a new database. Follow the `Quickstart tutorial` if needed.
21+
1. You can name the Sql server and database whatever you want to.
22+
1. Select or create a database server, and enter server login credentials. Carefully note down the username and password for the Sql server as you'll need it when constructing your Sql connection string later.
23+
1. Wait for the `Deployment succeeded` notification, then click on `Go to resource` to navigate to the newly created database's manage screen.
24+
1. Click on **Connection Strings** on left menu and copy the **ADO.NET (SQL authentication)** connection string. Populate **User ID={your_username};Password={your_password};** with values your provided during database creation.Copy this connection string.
25+
1. Click on **Application settings** in the left menu of the App service and add the copied Sql connection string in the **Connection strings** section as `DefaultConnection`.
26+
1. Choose `SQLAzure` in the **Type** dropdown. **Save** the setting.
27+
28+
### Publishing the sample
29+
30+
1. From the **Overview** tab of the App Service, download the publish profile by clicking the **Get publish profile** link and save it. Other deployment mechanisms, such as from source control, can also be used.
31+
1. Switch to Visual Studio and go to the WebApp-OpenIDConnect-DotNet-code-v2 project. Right click on the project in the Solution Explorer and select **Publish**. Click **Import Profile** on the bottom bar, and import the publish profile that you downloaded earlier.
32+
1. Click on **Configure** and in the `Connection tab`, update the Destination URL so that it is a `https` in the home page url, for example [https://WebApp-OpenIDConnect-DotNet-code-v2-contoso.azurewebsites.net](https://WebApp-OpenIDConnect-DotNet-code-v2-contoso.azurewebsites.net). Click **Next**.
33+
1. On the Settings tab, make sure `Enable Organizational Authentication` is NOT selected. Click **Save**. Click on **Publish** on the main screen.
34+
1. Visual Studio will publish the project and automatically open a browser to the URL of the project. If you see the default web page of the project, the publication was successful.
35+
36+
## Key Vault
37+
38+
Secure key management is essential to protect data in the cloud. Use [Azure Key Vault](https://azure.microsoft.com/en-ca/services/key-vault/) to encrypt keys and small secrets like passwords that use keys stored in hardware security modules (HSMs).
39+
40+
You can follow [this quickstart guide](https://docs.microsoft.com/en-us/azure/key-vault/quick-create-net) for getting an Azure web application to read information from [Azure Key Vault](https://azure.microsoft.com/en-ca/services/key-vault/) by using managed identities for Azure resources.
41+
42+
## Community Help and Support
43+
44+
Use [Stack Overflow](http://stackoverflow.com/questions/tagged/msal) to get support from the community.
45+
Ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before.
46+
Make sure that your questions or comments are tagged with [`azure-active-directory`] [`msal`] [`dotnet`].
47+
48+
If you find a bug in the sample, please raise the issue on [GitHub Issues](../../issues).
49+
50+
To provide a recommendation, visit the following [User Voice page](https://feedback.azure.com/forums/169401-azure-active-directory).
51+
52+
## More information
53+
54+
For more information, see MSAL.NET's conceptual documentation:
55+
56+
- [MSAL.NET's conceptual documentation](https://aka.ms/msal-net)
57+
- [National Clouds](https://docs.microsoft.com/en-us/azure/active-directory/develop/authentication-national-cloud#app-registration-endpoints)

0 commit comments

Comments
 (0)