Skip to content

Commit c8f5a9d

Browse files
feat: Added steps for authentication & bug fixes
1 parent a074487 commit c8f5a9d

21 files changed

Lines changed: 93 additions & 17 deletions
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Set up Authentication in Azure Container App
2+
3+
This document provides step-by-step instructions to configure Azure App Registrations for a front-end and back-end application.
4+
5+
## Prerequisites
6+
- Access to **Azure Active Directory (Azure AD)**
7+
- Necessary permissions to create and manage **App Registrations**
8+
9+
## Step 1: Add Authentication Provider
10+
We will add Microsoft Entra ID as an authentication provider to API and Web Application.
11+
12+
1. Add Authentication Provider in Web Application
13+
14+
- Go to deployed Container App and select ca-< your environment >-< randomname >-web and click **Add Identity Provider** button in Authentication
15+
![add_auth_provider_web_1](./Images/add_auth_provider_web_1.png)
16+
17+
- Select **Microsoft** and set **Client secret expiration** then Click **Add** button
18+
![add_auth_provider_web_2](./Images/add_auth_provider_web_2.png)
19+
20+
2. Add Authentication Provider in API Service
21+
22+
- Go to deployed Container App and select **ca-< your environment >-< randomname >-api** and click **Add Identity Provider** button in Authentication
23+
![add_auth_provider_web_1](./Images/add_auth_provider_api_1.png)
24+
25+
- Select **Microsoft** and set **Client secret expiration**
26+
![add_auth_provider_web_2](./Images/add_auth_provider_api_2.png)
27+
28+
- Set **Unauthenticated requests** then Click **Add** button
29+
![add_auth_provider_web_3](./Images/add_auth_provider_api_3.png)
30+
31+
## Step 2: Configure Application Registration - Web Application
32+
1. Set Redirect URI in Single Page Application Platform
33+
- Go to deployed Container App **ca-< your environment >-< randomname >-web** and select **Authentication** menu then select created Application Registration
34+
![configure_app_registration_web_1](./Images/configure_app_registration_web_1.png)
35+
36+
- Select **Authentication** then Select **+ Add a platform** menu
37+
![configuration_app_registration_web_2](./Images/configure_app_registration_web_2.png)
38+
39+
- Select **Single-page application**
40+
![configuration_app_registration_web_3](./Images/configure_app_registration_web_3.png)
41+
42+
- Add Container App **ca-< your environment >-< randomname >-web**'s URL
43+
![configuration_app_registration_web_4](./Images/configure_app_registration_web_4.png)
44+
- You may get this URL from here in your Container App
45+
![configuration_app_registration_web_5](./Images/configure_app_registration_web_5.png)
46+
47+
2. Add Permission and Grant Permission
48+
- Add Permission for API application. Select **+ Add a permission** button then search API application with name **ca-< your environment name >-<unique string>-api**
49+
![configuration_app_registration_web_6](./Images/configure_app_registration_web_6.png)
50+
![configuration_app_registration_web_7](./Images/configure_app_registration_web_7.png)
51+
- Grant admin consent to permissions
52+
![configuration_app_registration_web_8](./Images/configure_app_registration_web_8.png)
53+
54+
55+
## Step 3: Configure Application Registration - API Application
56+
Add Web Application Registration's Client Id to API's Allowed client application list.
57+
58+
## Step 4: Update Environment Variable in Container App for Web Application
59+
Update Environment variable for Client Id in Web App's application registration, Scope for Web as auth scope, Scope for API as token scope
60+
61+
62+
63+
64+
65+
## Conclusion
66+
You have successfully configured the front-end and back-end Azure App Registrations with proper API permissions and security settings.
107 KB
Loading
142 KB
Loading
138 KB
Loading
104 KB
Loading
141 KB
Loading
153 KB
Loading
122 KB
Loading
130 KB
Loading
103 KB
Loading

0 commit comments

Comments
 (0)