Skip to content

Commit a3249ee

Browse files
committed
update manual app registration config
1 parent 2e211ec commit a3249ee

10 files changed

Lines changed: 135 additions & 0 deletions
49.8 KB
Loading
103 KB
Loading
88.2 KB
Loading
66.7 KB
Loading
49.8 KB
Loading
103 KB
Loading
88.6 KB
Loading
64.2 KB
Loading
66.7 KB
Loading
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# Manual App Registration Configuration
2+
This guide provides detailed steps to manually register both front-end and backend applications in Azure if automated registration is not an option.
3+
4+
## Prerequisites
5+
6+
- Access to **Azure Active Directory (Azure AD)**
7+
- Necessary permissions to create and manage **App Registrations**
8+
9+
## Step 1: Register the Web Application
10+
### 1. Create App Registration
11+
- Go to **Azure Portal** > **Azure Active Directory** > **App registrations**
12+
- Click **+ New registration**
13+
- Name the app (e.g., `cps-app-web`)
14+
- Under **Redirect URI**, choose **Web** and enter:
15+
16+
```
17+
https://<web-app-url>azurecontainerapps.io/auth/login/aad/callback
18+
```
19+
20+
To find your Web App URL:
21+
- Navigate to your newly deployed resource group in the Azure Portal.
22+
- Locate the container app ending in `-web`.
23+
- Copy the Ingress URL from the Overview .
24+
25+
- Click **Register**
26+
![manual_register_app_web_1](./Images/manual_register_app_web_1.png)
27+
28+
29+
### 2. Expose an API
30+
31+
- Navigate to **Expose an API**
32+
- Click **+ Add a scope**
33+
- It will auto-fill the Application ID URI (use default or adjust as needed)
34+
- Click **Save and continue**
35+
- Add scope:
36+
- Scope name: `user_impersonation`
37+
- Admin consent display name: `Access Web App`
38+
- Admin consent description: `Allows the app to access the web application as the signed-in user`
39+
- Click **Add scope**
40+
![manual_register_app_web_2](./Images/manual_register_app_web_2.png)
41+
42+
43+
### 3. Configure Certificates and Secrets
44+
45+
- Go to **Certificates & secrets**
46+
- Click **+ New client secret**
47+
- Description: Provide a meaningful name to identify the secret
48+
- Expires: Select from the options or define a custom range
49+
- Start (Optional for custom range): Set the starting date of the secret's validity
50+
- End (Optional for custom range): Set the ending date of the secret's validity
51+
- Click **Add** and remember to copy and store the secret value securely as it will not be shown again
52+
![manual_register_app_web_3](./Images/manual_register_app_web_3.png)
53+
54+
### 4. Set Up Authentication in Web Container App
55+
56+
- Go to your Web Container App
57+
- Go to **Authentication**
58+
- Click **Add Identity Provider**
59+
- Choose **Microsoft**
60+
- Input:
61+
- **Client ID**: The Application (client) ID from the app registration
62+
- **Client Secret**: The secret value you generated in Certificates & Secrets from the app registration
63+
- **Issuer URL**: `https://sts.windows.net/<tenant_id>/v2.0`
64+
- **Allowed Token Audiences**: Usually the Application ID URI or Client ID
65+
- Click **Add**
66+
67+
![manual_register_app_web_4](./Images/manual_register_app_web_4.png)
68+
69+
70+
71+
72+
## Step 2: Register API Application
73+
74+
### 1. Create App Registration
75+
- Go to **Azure Portal** > **Azure Active Directory** > **App registrations**
76+
- Click **+ New registration**
77+
- Name the app (e.g., `cps-app-api`)
78+
- Under **Redirect URI**, choose **Web** and enter:
79+
80+
```
81+
https://<api-app-url>azurecontainerapps.io/auth/login/aad/callback
82+
```
83+
84+
To find your Web App URL:
85+
- Navigate to your newly deployed resource group in the Azure Portal.
86+
- Locate the container app ending in `-api`.
87+
- Copy the Ingress URL from the Overview .
88+
89+
- Click **Register**
90+
![manual_register_app_api_1](./Images/manual_register_app_api_1.png)
91+
92+
### 2. Expose an API
93+
94+
- Go to **Expose an API**
95+
- Click **+ Add a scope**
96+
- Use default Application ID URI
97+
- Add:
98+
- Scope name: `user_impersonation`
99+
- Admin consent details
100+
- Click **Add scope**
101+
![manual_register_app_api_2](./Images/manual_register_app_api_2.png)
102+
103+
### 3. Configure Certificates and Secrets
104+
105+
- Go to **Certificates & secrets**
106+
- Click **+ New client secret**
107+
- Description: Provide a meaningful name to identify the secret
108+
- Expires: Select from the options or define a custom range
109+
- Start (Optional for custom range): Set the starting date of the secret's validity
110+
- End (Optional for custom range): Set the ending date of the secret's validity
111+
- Click **Add** and remember to copy and store the secret value securely as it will not be shown again
112+
![manual_register_app_api_3](./Images/manual_register_app_api_3.png)
113+
114+
### 4. Set Up Authentication in API Container App
115+
116+
- Navigate to your API Container App
117+
- Go to **Authentication**
118+
- Click **Add Identity Provider**
119+
- Choose **Microsoft**
120+
- Fill in:
121+
- **Client ID**: The Application (client) ID from the app registration
122+
- **Client Secret**: The secret value you generated in Certificates & Secrets
123+
- **Issuer URL**: `https://sts.windows.net/<tenant_id>/v2.0`
124+
- **Allowed Token Audiences**: Usually the Application ID URI or Client ID
125+
- Click **Add**
126+
![manual_register_app_api_4](./Images/manual_register_app_api_4.png)
127+
![manual_register_app_api_5](./Images/manual_register_app_api_5.png)
128+
129+
---
130+
131+
## Conclusion
132+
133+
You have now manually configured Azure App Registrations.
134+
135+
For further configuration and steps, proceed to Step 2 in [Configure App Authentication](./ConfigureAppAuthentication.md).

0 commit comments

Comments
 (0)