You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note**: On Windows, use `py -3.12 -m uv` instead of `uv` for all commands to ensure you're using Python 3.12.
86
-
87
85
#### Option 2: Windows with WSL2 (Recommended)
88
86
89
87
```bash
@@ -219,41 +217,86 @@ To run the application locally, your Azure account needs the following role assi
219
217
220
218
The **main.bicep** deployment includes the assignment of the appropriate roles to AOAI, Storage account, Search service and Cosmos services. If you want to use resource group which is not deployed by you for local debugging—you will need to add your own credentials to access the Cosmos Storage account, Search service and AOAI services. You can add these permissions using the following commands:
221
219
222
-
#### Get Principal Id
220
+
#### Get Your AAD User Object ID (Principal ID)
221
+
222
+
Your Azure AD User Object ID (also called Principal ID) is required for the role assignments below. Choose either method to obtain it:
223
+
224
+
**Method 1: Using Azure CLI (Recommended)**
223
225
```bash
224
226
az ad signed-in-user show --query id -o tsv
225
227
```
226
228
229
+
**Method 2: Using Azure Portal**
230
+
1. Go to [Azure Portal](https://portal.azure.com)
231
+
2. Open **Microsoft Entra ID** (or search "Entra")
232
+
3. In the left menu, select **Users**
233
+
4. Select your account
234
+
5. Under **Identity**, copy the **Object ID**
235
+
236
+
> **Note:** The `<aad-user-object-id>` and `<principal-id>` in the commands below refer to the same ID obtained from either method above.
237
+
238
+
#### Get Your AAD User Principal Name (UPN)
239
+
240
+
Your Azure AD User Principal Name (UPN) is your sign-in email address and is required for some role assignments. Choose either method to obtain it:
241
+
242
+
**Method 1: Using Azure CLI (Recommended)**
243
+
```bash
244
+
az ad signed-in-user show --query userPrincipalName -o tsv
245
+
```
246
+
247
+
**Method 2: Using Azure Portal**
248
+
1. Go to [Azure Portal](https://portal.azure.com)
249
+
2. Open **Microsoft Entra ID** (or search "Entra")
250
+
3. In the left menu, select **Users**
251
+
4. Select your account
252
+
5. Copy the **User principal name** (typically your email address, e.g., user@domain.com)
253
+
254
+
> **Note:** The `<aad-user-upn>` in the commands below refers to your User Principal Name obtained from either method above.
255
+
227
256
#### Cosmos DB Access
257
+
228
258
```bash
229
259
# Assign Cosmos DB Built-in Data Contributor role
230
260
az cosmosdb sql role assignment create --resource-group <solution-accelerator-rg> --account-name <cosmos-db-account-name> --role-definition-name "Cosmos DB Built-in Data Contributor" --principal-id <aad-user-object-id> --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.DocumentDB/databaseAccounts/<cosmos-db-account-name>
231
261
```
232
262
233
-
#### AI Foundry access
263
+
#### AI Foundry Access
264
+
265
+
**To get your AI Foundry Project Resource ID:**
266
+
1. Go to [Azure Portal](https://portal.azure.com)
267
+
2. Navigate to your AI Foundry Project resource
268
+
3. In the **Project details** section, find and copy the **Project resource ID**
269
+
4. The format should be: `/subscriptions/<subscription-id>/resourceGroups/<rg-name>/providers/Microsoft.CognitiveServices/accounts/<foundry-account-name>/projects/<foundry-project-name>`
270
+
271
+
> **Note:** For AI Foundry, you need the complete project resource ID path (not just the account name). Use the full path shown in the Project resource ID field.
272
+
273
+
**Assign the required roles:**
234
274
235
275
```bash
236
-
az role assignment create --assignee <aad-user-upn> --role "Azure AI User" --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.CognitiveServices/accounts/<azure-ai-foundry-name>
276
+
# Azure AI User role
277
+
az role assignment create --assignee <aad-user-upn> --role "Azure AI User" --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.CognitiveServices/accounts/<foundry-account-name>/projects/<foundry-project-name>
237
278
```
238
279
239
280
```bash
240
-
az role assignment create --assignee <aad-user-upn> --role " Azure AI Developer " --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.CognitiveServices/accounts/<azure-ai-foundry-name>
281
+
# Azure AI Developer role
282
+
az role assignment create --assignee <aad-user-upn> --role "Azure AI Developer" --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.CognitiveServices/accounts/<foundry-account-name>/projects/<foundry-project-name>
241
283
```
242
284
243
285
```bash
244
-
az role assignment create --assignee <aad-user-upn> --role " Cognitive Services OpenAI User " --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.CognitiveServices/accounts/<azure-ai-foundry-name>
286
+
# Cognitive Services OpenAI User role
287
+
az role assignment create --assignee <aad-user-upn> --role "Cognitive Services OpenAI User" --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.CognitiveServices/accounts/<foundry-account-name>/projects/<foundry-project-name>
245
288
```
246
289
247
290
#### Search Service Access
248
291
249
-
```bash
250
-
az role assignment create --assignee <aad-user-upn> --role "Search Index Data Contributor" --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.Search/searchServices/<Search-service-name>
292
+
```bash
293
+
az role assignment create --assignee <aad-user-upn> --role "Search Index Data Contributor" --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.Search/searchServices/<search-service-name>
251
294
```
252
295
253
296
#### Storage Account Access
254
297
255
298
```bash
256
-
az role assignment create --assignee <aad-user-upn> --role "Storage Blob Data Contributor" --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.Storage/storageAccounts/<storage-account-name>
299
+
az role assignment create --assignee <aad-user-upn> --role "Storage Blob Data Contributor" --scope /subscriptions/<subscription-id>/resourceGroups/<solution-accelerator-rg>/providers/Microsoft.Storage/storageAccounts/<storage-account-name>
257
300
```
258
301
259
302
@@ -282,7 +325,7 @@ New-Item .env # Windows PowerShell
282
325
283
326
Add the following to the `.env` file:
284
327
285
-
- Copy all the values from `.env.example` (CTRL + A) and (CTRL +C)
328
+
- Copy all the values from `.env.sample` (CTRL + A) and (CTRL +C)
286
329
- Paste all copied value to `.env` (CTRL + V)
287
330
288
331
Get All the values from the Backend container app from Azure portal
@@ -295,9 +338,9 @@ For reference, see the image below:
0 commit comments