Open themagiccog opened 1 year ago
Hi @themagiccog,
2.47.0 is not the latest Azure CLI(2.51.0).
Please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.
Thank you for opening this issue, we will look into it.
@evelyn-ys any updates? Please. Thanks!
@yonzhan I will appreciate any help. Please respond. Thanks! :)
@themagiccog az datafactory
is CLI extension contributed by datafactory service team. Better to open issue under https://github.com/Azure/azure-cli-extensions/issues
cc service team contributor @mindlessroman to take a look
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Jingshu923, @zhangyd2015, @Frey-Wang.
Author: | themagiccog |
---|---|
Assignees: | jiasli, evelyn-ys |
Labels: | `bug`, `Service Attention`, `Graph`, `Data Factory`, `customer-reported`, `Auto-Assign`, `Auto-Resolve` |
Milestone: | Backlog |
Describe the bug
When we run the command
az datafactory integration-runtime self-hosted create
, and try to use the --linked-info flag, it doesnt not work.For example, the code below doesnt work (see error below) az datafactory integration-runtime self-hosted create \ --verbose \ --factory-name $ADF_NAME \ --resource-group $RG \ --name "MY-ADF-IR" \ --description "This is IR for new deploy using az cli" \ --linked-info '{ "linkedInfo": { "resourceId": "/subscriptions/xxxx/resourcegroups/gxxxxx-rg/providers/Microsoft.DataFactory/factories/gxxxxx-adf/integrationruntimes/ANOTHER-ADF", "authorizationType": "Rbac"} }' \ --debug
Related command
Using Powershell (az cli pwsh), this command works: Set-AzDataFactoryV2IntegrationRuntime
-ResourceGroupName 'xxxx-rg'
-DataFactoryName 'xxxx-adf'-Name 'NW-IR-ADF'
-Type SelfHosted-SharedIntegrationRuntimeResourceId /subscriptions/xxxxxx/resourcegroups/xxxxxx-rg/providers/Microsoft.DataFactory/factories/xxxxx-adf/integrationruntimes/ANOTHER-ADF
-Description "new"Errors
(InvalidParameter) Parameter authorizationType is not valid. Code: InvalidParameter Message: Parameter authorizationType is not valid.
Issue script & Debug output
cli.knack.cli: Command arguments: ['datafactory', 'integration-runtime', 'self-hosted', 'create', '--verbose', '--factory-name', 'xxxxxxxx-adf', '--resource-group', 'xxxxxxxx-rg', '--name', 'xxxxxxxxxx-ADF', '--description', 'This is IR for new deploy using az cli', '--linked-info', '{ "linkedInfo": { "resourceId": "/subscriptions/xxxxxxxx/resourcegroups/xxxxxxxx-rg/providers/Microsoft.DataFactory/factories/xxxxxxxx-adf/integrationruntimes/xxxxxxxxxx-ADF", "authorizationType": "Rbac"} }', '--debug'] cli.knack.cli: init debug log: Enable color in terminal. cli.knack.cli: Event: Cli.PreExecute [] cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7fe8144b9480>, <function OutputProducer.on_global_arguments at 0x7fe8143c80d0>, <function CLIQuery.on_global_arguments at 0x7fe8143f92d0>] cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] cli.azure.cli.core: Modules found from index for 'datafactory': ['azext_datafactory'] cli.azure.cli.core: Loading command modules: cli.azure.cli.core: Name Load Time Groups Commands cli.azure.cli.core: Total (0) 0.000 0 0 cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next'] cli.azure.cli.core: Loading extensions: cli.azure.cli.core: Name Load Time Groups Commands Directory cli.azure.cli.core: datafactory 0.009 16 79 /home/frank/.azure/cliextensions/datafactory cli.azure.cli.core: Total (1) 0.009 16 79.add_subscription_parameter at 0x7fe81327b6d0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7fe8132c9630>, <function register_cache_arguments..add_cache_arguments at 0x7fe8132c9750>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fe8143c8160>, <function CLIQuery.handle_query_parameter at 0x7fe8143f9360>, <function register_ids_argument..parse_ids_arguments at 0x7fe8132c96c0>]
az_command_data_logger: extension name: datafactory
az_command_data_logger: extension version: 0.7.0
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=DataFactoryManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='/home/frank/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /home/frank/.azure/msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/xxxxxxxxxx/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/xxxxxxxxxx/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/xxxxxxxxxx/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/xxxxxxxxxx/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/xxxxxxxxxx/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/xxxxxxxxxx/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/xxxxxxxxxx/kerberos', 'tenant_region_scope': 'NA', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? False
azext_datafactory.vendored_sdks.datafactory._serialization: Discriminator authorization_type is absent or null, use base class LinkedIntegrationRuntimeType.
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: xxxxxxxx
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/xxxxxxxx/resourceGroups/xxxxxxxx-rg/providers/Microsoft.DataFactory/factories/xxxxxxxx-adf/integrationRuntimes/xxxxxxxxxx-ADF?api-version=2018-06-01'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies: 'Content-Length': '133'
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'xxxxxxxx'
cli.azure.cli.core.sdk.policies: 'CommandName': 'datafactory integration-runtime self-hosted create'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--verbose --factory-name --resource-group --name --description --linked-info --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.47.0 (DEB) azsdk-python-mgmt-datafactory/2.8.0 Python/3.10.10 (Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35)'
cli.azure.cli.core.sdk.policies: 'Authorization': '**'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"properties": {"type": "SelfHosted", "description": "This is IR for new deploy using az cli", "typeProperties": {"linkedInfo": {}}}}
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/xxxxxxxx/resourceGroups/xxxxxxxx-rg/providers/Microsoft.DataFactory/factories/xxxxxxxx-adf/integrationRuntimes/xxxxxxxxxx-ADF?api-version=2018-06-01 HTTP/1.1" 400 120
cli.azure.cli.core.sdk.policies: Response status: 400
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies: 'Content-Length': '120'
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=UTF-8'
cli.azure.cli.core.sdk.policies: 'Expires': '-1'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '1195'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'xxxxxxxxxxxx'
cli.azure.cli.core.sdk.policies: 'Server': 'Kestrel'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': 'xxxxxxxxxxxx'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'WESTUS2:20230803T050636Z:xxxxxxxxxxxx'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies: 'Date': 'Thu, 03 Aug 2023 05:06:35 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"error":{"code":"InvalidParameter","message":"Parameter authorizationType is not valid.","target":null,"details":null}}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 333, in call
return self.handler(args, kwargs)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(*command_args)
File "/home/frank/.azure/cliextensions/datafactory/azext_datafactory/generated/custom.py", line 273, in datafactory_integration_runtime_self_hosted_create
return client.create_or_update(
File "/opt/az/lib/python3.10/site-packages/azure/core/tracing/decorator.py", line 73, in wrapper_use_tracer
return func(args, **kwargs)
File "/home/frank/.azure/cliextensions/datafactory/azext_datafactory/vendored_sdks/datafactory/operations/_integration_runtimes_operations.py", line 1120, in create_or_update
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
azure.core.exceptions.HttpResponseError: (InvalidParameter) Parameter authorizationType is not valid.
Code: InvalidParameter
Message: Parameter authorizationType is not valid.
cli.azure.cli.core: Loaded 16 groups, 79 commands. cli.azure.cli.core: Found a match in the command table. cli.azure.cli.core: Raw command : datafactory integration-runtime self-hosted create cli.azure.cli.core: Command table: datafactory integration-runtime self-hosted create cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fe813262b90>] cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/frank/.azure/commands/2023-08-03.00-06-36.datafactory_integration-runtime_self-hosted_create.9630.log'. az_command_data_logger: command args: datafactory integration-runtime self-hosted create --verbose --factory-name {} --resource-group {} --name {} --description {} --linked-info {} --debug cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.
cli.azure.cli.core.azclierror: (InvalidParameter) Parameter authorizationType is not valid. Code: InvalidParameter Message: Parameter authorizationType is not valid. az_command_data_logger: (InvalidParameter) Parameter authorizationType is not valid. Code: InvalidParameter Message: Parameter authorizationType is not valid. cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fe813262dd0>] az_command_data_logger: exit code: 1 cli.main: Command ran in 0.809 seconds (init: 0.211, invoke: 0.597) telemetry.main: Begin splitting cli events and extra events, total events: 1 telemetry.client: Accumulated 0 events. Flush the clients. telemetry.main: Finish splitting cli events and extra events, cli events: 1 telemetry.save: Save telemetry record of length 3810 in cache telemetry.check: Returns Positive. telemetry.main: Begin creating telemetry upload process. telemetry.process: Creating upload process: "/usr/bin/../../opt/az/bin/python3 /opt/az/lib/python3.10/site-packages/azure/cli/telemetry/init.py /home/frank/.azure" telemetry.process: Return from creating process telemetry.main: Finish creating telemetry upload process.
Expected behavior
When command is run, the IR should be created
Environment Summary
azure-cli 2.47.0 *
core 2.47.0 telemetry 1.0.8
Extensions: datafactory 0.7.0 rdbms-connect 1.0.4
Dependencies: msal 1.20.0 azure-mgmt-resource 22.0.0
Additional context
No response