Skip to content

Commit ed5fd4d

Browse files
authored
Fix scopes to use auth2.0 instea of auth1.0 (Azure#38552)
1 parent 6217ffb commit ed5fd4d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

sdk/ai/azure-ai-projects/azure/ai/projects/_patch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__( # pylint: disable=super-init-not-called,too-many-statements
6868
project_name=project_name,
6969
credential=credential,
7070
api_version="2020-02-02",
71-
credential_scopes=["https://management.azure.com"],
71+
credential_scopes=["https://management.azure.com/.default"],
7272
**kwargs0,
7373
)
7474

@@ -106,7 +106,7 @@ def __init__( # pylint: disable=super-init-not-called,too-many-statements
106106
project_name=project_name,
107107
credential=credential,
108108
api_version="2024-07-01-preview",
109-
credential_scopes=["https://management.azure.com"],
109+
credential_scopes=["https://management.azure.com/.default"],
110110
**kwargs1,
111111
)
112112
_policies1 = kwargs1.pop("policies", None)
@@ -137,7 +137,7 @@ def __init__( # pylint: disable=super-init-not-called,too-many-statements
137137
project_name=project_name,
138138
credential=credential,
139139
api_version="2024-07-01-preview", # TODO: Update me
140-
credential_scopes=["https://ml.azure.com"],
140+
credential_scopes=["https://ml.azure.com/.default"],
141141
**kwargs2,
142142
)
143143
_policies2 = kwargs2.pop("policies", None)
@@ -169,7 +169,7 @@ def __init__( # pylint: disable=super-init-not-called,too-many-statements
169169
project_name=project_name,
170170
credential=credential,
171171
api_version="2024-07-01-preview", # TODO: Update me
172-
credential_scopes=["https://ml.azure.com"], # TODO: Update once service changes are ready
172+
credential_scopes=["https://ml.azure.com/.default"], # TODO: Update once service changes are ready
173173
**kwargs3,
174174
)
175175
_policies3 = kwargs3.pop("policies", None)

sdk/ai/azure-ai-projects/azure/ai/projects/aio/_patch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __init__( # pylint: disable=super-init-not-called,too-many-statements
7474
project_name=project_name,
7575
credential=credential,
7676
api_version="2020-02-02",
77-
credential_scopes=["https://management.azure.com"],
77+
credential_scopes=["https://management.azure.com/.default"],
7878
**kwargs0,
7979
)
8080

@@ -106,7 +106,7 @@ def __init__( # pylint: disable=super-init-not-called,too-many-statements
106106
project_name=project_name,
107107
credential=credential,
108108
api_version="2024-07-01-preview",
109-
credential_scopes=["https://management.azure.com"],
109+
credential_scopes=["https://management.azure.com/.default"],
110110
**kwargs1,
111111
)
112112
_policies1 = kwargs1.pop("policies", None)
@@ -137,7 +137,7 @@ def __init__( # pylint: disable=super-init-not-called,too-many-statements
137137
project_name=project_name,
138138
credential=credential,
139139
api_version="2024-07-01-preview", # TODO: Update me
140-
credential_scopes=["https://ml.azure.com"],
140+
credential_scopes=["https://ml.azure.com/.default"],
141141
**kwargs2,
142142
)
143143
_policies2 = kwargs2.pop("policies", None)
@@ -169,7 +169,7 @@ def __init__( # pylint: disable=super-init-not-called,too-many-statements
169169
project_name=project_name,
170170
credential=credential,
171171
api_version="2024-07-01-preview", # TODO: Update me
172-
credential_scopes=["https://ml.azure.com"], # TODO: Update once service changes are ready
172+
credential_scopes=["https://ml.azure.com/.default"], # TODO: Update once service changes are ready
173173
**kwargs3,
174174
)
175175
_policies3 = kwargs3.pop("policies", None)

0 commit comments

Comments
 (0)