Skip to content

Commit e373e59

Browse files
committed
move optional auth info
1 parent 64dc821 commit e373e59

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

articles/ai-foundry/includes/create-project-fdp.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,23 @@ Use the following tabs to select the method you plan to use to create a [!INCLUD
4848
- Complete these steps to start your Python script:
4949
1. Install packages: `pip install azure-identity azure-mgmt-cognitiveservices`. If in a notebook cell, use `%pip install azure-identity azure-mgmt-cognitiveservices`.
5050
1. Use `pip show azure-mgmt-cognitiveservices` to verify your version is 13.7 or greater.
51-
1. Start your script with the following code to create the `client` connection and variables used throughout this article. This example creates the project in West US:
51+
1. Start your script with the following code to create the `client` connection and variables used throughout this article. This example creates the project in East US:
52+
53+
:::code language="python" source="~/foundry-samples-main/samples/microsoft/python/mslearn-resources/quickstart/create_project.py" id="create_client":::
54+
55+
1. (Optional) If you have multiple accounts, add the tenant ID of the Microsoft Entra ID you wish to use into the `DefaultAzureCredential`. Find your tenant ID from the [Azure portal](https://portal.azure.com) under **Microsoft Entra ID, External Identities**.
56+
57+
```python
58+
DefaultAzureCredential(interactive_browser_tenant_id="<TENANT_ID>")
59+
```
60+
61+
1. (Optional) If you're working on in the [Azure Government - US](/azure/azure-government/documentation-government-welcome) or [Azure China 21Vianet](https://azure.microsoft.com/global-infrastructure/services/?regions=china-east-2%2cchina-non-regional&products=all) regions, specify the region into which you want to authenticate. You can specify the region with `DefaultAzureCredential`. The following example authenticates to the Azure Government - US region:
62+
63+
```python
64+
from azure.identity import AzureAuthorityHosts
65+
DefaultAzureCredential(authority=AzureAuthorityHosts.AZURE_GOVERNMENT)
66+
```
5267

53-
:::code language="python" source="~/foundry-samples-main/samples/microsoft/python/mslearn-resources/quickstart/create_project.py" id="create_client":::
54-
5568

5669

5770
# [Azure CLI](#tab/azurecli)
@@ -108,19 +121,6 @@ To create a [!INCLUDE [fdp](../includes/fdp-project-name.md)]:
108121

109122
:::code language="python" source="~/foundry-samples-main/samples/microsoft/python/mslearn-resources/quickstart/create_project.py" id="create_resource_project":::
110123

111-
1. (Optional) If you have multiple accounts, add the tenant ID of the Microsoft Entra ID you wish to use into the `DefaultAzureCredential`. Find your tenant ID from the [Azure portal](https://portal.azure.com) under **Microsoft Entra ID, External Identities**.
112-
113-
```python
114-
DefaultAzureCredential(interactive_browser_tenant_id="<TENANT_ID>")
115-
```
116-
117-
1. (Optional) If you're working on in the [Azure Government - US](/azure/azure-government/documentation-government-welcome) or [Azure China 21Vianet](https://azure.microsoft.com/global-infrastructure/services/?regions=china-east-2%2cchina-non-regional&products=all) regions, specify the region into which you want to authenticate. You can specify the region with `DefaultAzureCredential`. The following example authenticates to the Azure Government - US region:
118-
119-
```python
120-
from azure.identity import AzureAuthorityHosts
121-
DefaultAzureCredential(authority=AzureAuthorityHosts.AZURE_GOVERNMENT)
122-
```
123-
124124

125125
# [Azure CLI](#tab/azurecli)
126126

0 commit comments

Comments
 (0)