Skip to content

Commit 348cd8a

Browse files
authored
Fixing credentials in datastore
Original issue was caused by PR - Azure/azure-sdk-for-python#26584 reported by customer in - Azure/azure-sdk-for-python#37704
1 parent 83a6833 commit 348cd8a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/machine-learning/how-to-datastore.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ ml_client.create_or_update(store)
180180

181181
```python
182182
from azure.ai.ml.entities import AzureDataLakeGen2Datastore
183-
from azure.ai.ml.entities._datastore.credentials import ServicePrincipalCredentials
183+
from azure.ai.ml.entities._credentials import ServicePrincipalConfiguration
184184

185185
from azure.ai.ml import MLClient
186186

@@ -191,7 +191,7 @@ store = AzureDataLakeGen2Datastore(
191191
description="Datastore pointing to an Azure Data Lake Storage Gen2.",
192192
account_name="mytestdatalakegen2",
193193
filesystem="my-gen2-container",
194-
credentials=ServicePrincipalCredentials(
194+
credentials=ServicePrincipalConfiguration(
195195
tenant_id= "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
196196
client_id= "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
197197
client_secret= "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
@@ -356,7 +356,7 @@ ml_client.create_or_update(store)
356356

357357
```python
358358
from azure.ai.ml.entities import AzureDataLakeGen1Datastore
359-
from azure.ai.ml.entities._datastore.credentials import ServicePrincipalCredentials
359+
from azure.ai.ml.entities._credentials import ServicePrincipalConfiguration
360360
from azure.ai.ml import MLClient
361361

362362
ml_client = MLClient.from_config()
@@ -365,7 +365,7 @@ store = AzureDataLakeGen1Datastore(
365365
name="adls_gen1_example",
366366
description="Datastore pointing to an Azure Data Lake Storage Gen1.",
367367
store_name="mytestdatalakegen1",
368-
credentials=ServicePrincipalCredentials(
368+
credentials=ServicePrincipalConfiguration(
369369
tenant_id= "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
370370
client_id= "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
371371
client_secret= "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
@@ -466,7 +466,7 @@ ml_client.create_or_update(store)
466466

467467
```python
468468
from azure.ai.ml.entities import AzureDataLakeGen1Datastore
469-
from azure.ai.ml.entities._datastore.credentials import ServicePrincipalCredentials
469+
from azure.ai.ml.entities._credentials import ServicePrincipalConfiguration
470470
from azure.ai.ml import MLClient
471471

472472
ml_client = MLClient.from_config()
@@ -485,7 +485,7 @@ store = OneLakeDatastore(
485485
name="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/Files", #{your_one_lake_artifact_guid}/Files
486486
type="lake_house"
487487
)
488-
credentials=ServicePrincipalCredentials(
488+
credentials=ServicePrincipalConfiguration(
489489
tenant_id= "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
490490
client_id= "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
491491
client_secret= "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",

0 commit comments

Comments
 (0)