Skip to content

Commit f8fe63b

Browse files
fix for bug 29988
1 parent ef74a4e commit f8fe63b

1 file changed

Lines changed: 56 additions & 13 deletions

File tree

docs/LocalDevelopmentSetup.md

Lines changed: 56 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ winget install OpenJS.NodeJS.LTS
8282
py -3.12 -m pip install uv
8383
```
8484

85-
**Note**: On Windows, use `py -3.12 -m uv` instead of `uv` for all commands to ensure you're using Python 3.12.
86-
8785
#### Option 2: Windows with WSL2 (Recommended)
8886

8987
```bash
@@ -219,41 +217,86 @@ To run the application locally, your Azure account needs the following role assi
219217

220218
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:
221219

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)**
223225
```bash
224226
az ad signed-in-user show --query id -o tsv
225227
```
226228

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+
227256
#### Cosmos DB Access
257+
228258
```bash
229259
# Assign Cosmos DB Built-in Data Contributor role
230260
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>
231261
```
232262

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:**
234274

235275
```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>
237278
```
238279

239280
```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>
241283
```
242284

243285
```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>
245288
```
246289

247290
#### Search Service Access
248291

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>
251294
```
252295

253296
#### Storage Account Access
254297

255298
```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>
257300
```
258301

259302

@@ -282,7 +325,7 @@ New-Item .env # Windows PowerShell
282325

283326
Add the following to the `.env` file:
284327

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)
286329
- Paste all copied value to `.env` (CTRL + V)
287330

288331
Get All the values from the Backend container app from Azure portal
@@ -295,9 +338,9 @@ For reference, see the image below:
295338
![Environment_variables_example](./images/Environment_varibles_example.png)
296339

297340
- Make sure to set APP_ENV to "**dev**"
298-
- Keep Below variables as it is from `.env.example`.
341+
- Keep Below variables as it is from `.env.sample`:
299342
- `BACKEND_API_URL=http://localhost:8000`
300-
- `FRONTEND_SITE_NAME=http://127.0.0.1:3000`
343+
- `FRONTEND_SITE_NAME=*`
301344
- `MCP_SERVER_ENDPOINT=http://localhost:9000/mcp`
302345

303346
### 4.3. Install Backend Dependencies

0 commit comments

Comments
 (0)