Skip to content

Commit 9979299

Browse files
authored
{dls} Set scopes when creating AzureDLFileSystem (#30786)
1 parent 853ff0b commit 9979299

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/azure-cli/azure/cli/command_modules/dls/_client_factory.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ def cf_dls_account_trusted_provider(cli_ctx, _):
2525
def cf_dls_filesystem(cli_ctx, account_name):
2626
from azure.datalake.store import core
2727
from azure.cli.core._profile import Profile
28+
from azure.cli.core.auth.util import resource_to_scopes
2829

2930
cred, _, _ = Profile(cli_ctx=cli_ctx).get_login_credentials()
3031
return core.AzureDLFileSystem(
3132
token_credential=cred,
3233
store_name=account_name,
33-
url_suffix=cli_ctx.cloud.suffixes.azure_datalake_store_file_system_endpoint)
34+
url_suffix=cli_ctx.cloud.suffixes.azure_datalake_store_file_system_endpoint,
35+
scopes=resource_to_scopes(cli_ctx.cloud.endpoints.active_directory_data_lake_resource_id)[0])

0 commit comments

Comments
 (0)