Describe the bug
adding a sql connection to web app failed with missing pyodbc package
from "create on cloud shell" button on the portal create connection
Related command
az webapp connection create sql --connection sql_658b7 --source-id /subscriptions//resourceGroups/D-prod/providers/Microsoft.Web/sites/D --target-id /subscriptions//resourceGroups/D-prod/providers/Microsoft.Sql/servers/d-prod-sqlserver/databases/r --client-type dotnet --system-identity
Errors
ModuleNotFoundError: Dependency pyodbc can't be installed, please install it manually with /usr/bin/python3.12 -m pip install pyodbc.
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
tui_chan@Azure:~$ /usr/bin/python3.12 -m pip install pyodbc
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pyodbc in ./.local/lib/python3.12/site-packages (5.2.0)
Issue script & Debug output
az webapp connection create sql --connection sql_658b7 --source-id "/subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Web/sites/D-rowm" --target-id "/subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Sql/servers/D-prod-sqlserver/databases/rowm" --client-type dotnet --system-identity --debug
cli.knack.cli: Command arguments: ['webapp', 'connection', 'create', 'sql', '--connection', 'sql_658b7', '--source-id', '/subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Web/sites/D-rowm', '--target-id', '/subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Sql/servers/D-prod-sqlserver/databases/rowm', '--client-type', 'dotnet', '--system-identity', '--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 0x7fdc45c86020>, <function OutputProducer.on_global_arguments at 0x7fdc4597f740>, <function CLIQuery.on_global_arguments at 0x7fdc459bccc0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'webapp': ['azure.cli.command_modules.appservice', 'azure.cli.command_modules.serviceconnector', 'azext_serviceconnector_passwordless']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: appservice 0.300 80 277
cli.azure.cli.core: serviceconnector 0.182 20 323
cli.azure.cli.core: Total (2) 0.483 100 600
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: ai-examples 0.143 1 1 /usr/lib/python3.12/site-packages/azure-cli-extensions/ai-examples
cli.azure.cli.core: serviceconnector-passwordless 0.120 14 18 /home/t/.azure/cliextensions/serviceconnector-passwordless
cli.azure.cli.core: Total (2) 0.263 15 19
cli.azure.cli.core: Loaded 99 groups, 601 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : webapp connection create sql
cli.azure.cli.core: Command table: webapp connection create sql
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fdc44ac0720>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/t/.azure/commands/2025-04-26.22-48-04.webapp_connection_create_sql.5743.log'.
az_command_data_logger: command args: webapp connection create sql --connection {} --source-id {} --target-id {} --client-type {} --system-identity --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7fdc44b3c360>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7fdc44b3c400>, <function register_cache_arguments..add_cache_arguments at 0x7fdc44b3c540>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7fdc44b3c5e0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fdc4597f7e0>, <function CLIQuery.handle_query_parameter at 0x7fdc459bcd60>, <function register_ids_argument..parse_ids_arguments at 0x7fdc44b3c4a0>]
az_command_data_logger: extension name: serviceconnector-passwordless
az_command_data_logger: extension version: 3.3.1
cli.azure.cli.core.commands: The behavior of this command has been altered by the following extension: serviceconnector-passwordless
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ServiceLinkerManagementClient
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/common/
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool: https://login.microsoftonline.com:443 "GET /common//v2.0/.well-known/openid-configuration HTTP/1.1" 200 1547
msal.authority: openid_config("https://login.microsoftonline.com/common//v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/common/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/{tenantid}/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/common/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/common/kerberos', 'tenant_region_scope': None, '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? None
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.knack.cli: Command arguments: ['account', 'show', '-o', 'json']
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 0x7fdc45c86020>, <function OutputProducer.on_global_arguments at 0x7fdc4597f740>, <function CLIQuery.on_global_arguments at 0x7fdc459bccc0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'account': ['azure.cli.command_modules.profile', 'azure.cli.command_modules.resource']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: profile 0.022 2 8
cli.azure.cli.core: resource 0.028 52 232
cli.azure.cli.core: Total (2) 0.050 54 240
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: ai-examples 0.002 1 1 /usr/lib/python3.12/site-packages/azure-cli-extensions/ai-examples
cli.azure.cli.core: Total (1) 0.002 1 1
cli.azure.cli.core: Loaded 54 groups, 241 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : account show
cli.azure.cli.core: Command table: account show
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fdc44ac0720>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/t/.azure/commands/2025-04-26.22-48-04.account_show.5743.log'.
az_command_data_logger: command args: account show -o {}
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7fdc43c40900>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7fdc43c409a0>, <function register_cache_arguments..add_cache_arguments at 0x7fdc43c40ae0>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7fdc43c40b80>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fdc4597f7e0>, <function CLIQuery.handle_query_parameter at 0x7fdc459bcd60>, <function register_ids_argument..parse_ids_arguments at 0x7fdc43c40a40>]
cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7fdc44b10b80>, <function _x509_from_base64_to_hex_transform at 0x7fdc44b10c20>]
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fdc44ac09a0>]
az_command_data_logger: exit code: 0
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.knack.cli: Command arguments: ['account', 'show', '-o', 'json']
cli.knack.cli: init debug log:
Enable color in terminal.
az_command_data_logger: exit code: 0
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.knack.cli: Command arguments: ['sql', 'server', 'ad-admin', 'list', '--ids', '/subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Sql/servers/D-prod-sqlserver/databases/rowm', '-o', 'json']
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 0x7fdc45c86020>, <function OutputProducer.on_global_arguments at 0x7fdc4597f740>, <function CLIQuery.on_global_arguments at 0x7fdc459bccc0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'sql': ['azure.cli.command_modules.sql', 'azure.cli.command_modules.sqlvm']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: sql 0.012 56 215
cli.azure.cli.core: sqlvm 0.001 4 20
cli.azure.cli.core: Total (2) 0.013 60 235
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: ai-examples 0.001 1 1 /usr/lib/python3.12/site-packages/azure-cli-extensions/ai-examples
cli.azure.cli.core: Total (1) 0.001 1 1
cli.azure.cli.core: Loaded 60 groups, 236 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : sql server ad-admin list
cli.azure.cli.core: Command table: sql server ad-admin list
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fdc44ac0720>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/t/.azure/commands/2025-04-26.22-48-08.sql_server_ad-admin_list.5743.log'.
az_command_data_logger: command args: sql server ad-admin list --ids {} -o {}
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7fdc40502520>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7fdc40502700>, <function register_cache_arguments..add_cache_arguments at 0x7fdc40502840>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7fdc405028e0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fdc4597f7e0>, <function CLIQuery.handle_query_parameter at 0x7fdc459bcd60>, <function register_ids_argument..parse_ids_arguments at 0x7fdc405027a0>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=SqlManagementClient
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/common/
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool: https://login.microsoftonline.com:443 "GET /common//v2.0/.well-known/openid-configuration HTTP/1.1" 200 1547
msal.authority: openid_config("https://login.microsoftonline.com/common//v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/common/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/{tenantid}/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/common/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/common/kerberos', 'tenant_region_scope': None, '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? None
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token_info: scopes=('https://management.core.windows.net//.default',), options={}
cli.azure.cli.core.auth.msal_credentials: CloudShellCredential.acquire_token: scopes=['https://management.core.windows.net//.default'], kwargs={}
urllib3.connectionpool: Starting new HTTP connection (1): localhost:50342
urllib3.connectionpool: http://localhost:50342 "POST /oauth2/token HTTP/1.1" 200 2752
msal.token_cache: event={
"authority_type": "CLOUDSHELL",
"client_id": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
"data": {},
"response": {
"access_token": "",
"client_info": "eyJ1aWQiOiAiM2FlOGFhNTAtMTRlNC00OWMzLWExNTAtNjBiOTI3NTA4ZTdiIiwgInV0aWQiOiAiYTQzOTBlMWMtNjYxZi00Y2FiLWExY2QtYTJhOWQ4NTA4Yjk4In0=",
"expires_in": 1897,
"id_token_claims": "",
"token_type": "Bearer"
},
"scope": [
"https://management.core.windows.net//.default"
],
"token_endpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/token"
}
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Sql/servers/D-prod-sqlserver/administrators?api-version=2020-11-01-preview'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '85f740d8-22f0-11f0-a257-00155d97d99c'
cli.azure.cli.core.sdk.policies: 'CommandName': 'sql server ad-admin list'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--ids -o'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.71.0 (RPM) azsdk-python-core/1.31.0 Python/3.12.9 (Linux-6.1.124.1-microsoft-standard-x86_64-with-glibc2.38) cloud-shell/1.0 CliExtension/serviceconnector-passwordless(3.3.1)'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Sql/servers/D-prod-sqlserver/administrators?api-version=2020-11-01-preview HTTP/1.1" 200 432
cli.azure.cli.core.sdk.policies: Response status: 200
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': '432'
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-request-id': '0f59ae1e-c46a-4f56-9dc8-f2497e5cc7eb'
cli.azure.cli.core.sdk.policies: 'x-ms-operation-identifier': 'tenantId=a4390e1c-661f-4cab-a1cd-a2a9d8508b98,objectId=3ae8aa50-14e4-49c3-a150-60b927508e7b/eastus2/f6cfca1e-30fb-441a-b017-2b5d6c2b3c1b'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-reads': '249'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '48e79b62-f85d-41fc-b409-b3e170255a15'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'EASTUS2:20250426T224808Z:48e79b62-f85d-41fc-b409-b3e170255a15'
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: 'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: 83FB3B5A9A6347EA856AC094F54144BB Ref B: BL2AA2011004054 Ref C: 2025-04-26T22:48:08Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Sat, 26 Apr 2025 22:48:08 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fdc44ac09a0>]
az_command_data_logger: exit code: 0
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.knack.cli: Command arguments: ['account', 'get-access-token', '--output', 'json', '--resource', 'https://database.windows.net/', '-o', 'json']
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 0x7fdc45c86020>, <function OutputProducer.on_global_arguments at 0x7fdc4597f740>, <function CLIQuery.on_global_arguments at 0x7fdc459bccc0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'account': ['azure.cli.command_modules.profile', 'azure.cli.command_modules.resource']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: profile 0.001 2 8
cli.azure.cli.core: resource 0.013 52 232
cli.azure.cli.core: Total (2) 0.014 54 240
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: ai-examples 0.001 1 1 /usr/lib/python3.12/site-packages/azure-cli-extensions/ai-examples
cli.azure.cli.core: Total (1) 0.001 1 1
cli.azure.cli.core: Loaded 54 groups, 241 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : account get-access-token
cli.azure.cli.core: Command table: account get-access-token
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fdc44ac0720>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/t/.azure/commands/2025-04-26.22-48-08.account_get-access-token.5743.log'.
az_command_data_logger: command args: account get-access-token --output {} --resource {} -o {}
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7fdc42cd9440>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7fdc42cd93a0>, <function register_cache_arguments..add_cache_arguments at 0x7fdc42cd9260>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7fdc42cd91c0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fdc4597f7e0>, <function CLIQuery.handle_query_parameter at 0x7fdc459bcd60>, <function register_ids_argument..parse_ids_arguments at 0x7fdc42cd9300>]
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/common/
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool: https://login.microsoftonline.com:443 "GET /common//v2.0/.well-known/openid-configuration HTTP/1.1" 200 1547
msal.authority: openid_config("https://login.microsoftonline.com/common//v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/common/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/{tenantid}/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/common/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/common/kerberos', 'tenant_region_scope': None, '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? None
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://database.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_credentials: CloudShellCredential.acquire_token: scopes=['https://database.windows.net//.default'], kwargs={}
urllib3.connectionpool: Starting new HTTP connection (1): localhost:50342
urllib3.connectionpool: http://localhost:50342 "POST /oauth2/token HTTP/1.1" 200 2462
msal.token_cache: event={
"authority_type": "CLOUDSHELL",
"client_id": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
"data": {},
"response": {
"access_token": "",
"client_info": "eyJ1aWQiOiAiM2FlOGFhNTAtMTRlNC00OWMzLWExNTAtNjBiOTI3NTA4ZTdiIiwgInV0aWQiOiAiYTQzOTBlMWMtNjYxZi00Y2FiLWExY2QtYTJhOWQ4NTA4Yjk4In0=",
"expires_in": 1040,
"id_token_claims": "",
"token_type": "Bearer"
},
"scope": [
"https://database.windows.net//.default"
],
"token_endpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/token"
}
cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7fdc44b10b80>, <function _x509_from_base64_to_hex_transform at 0x7fdc44b10c20>]
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fdc44ac09a0>]
az_command_data_logger: exit code: 0
cli.azext_serviceconnector_passwordless._credential_free: DRIVER={{{driver}}};server=D-prod-sqlserver.database.windows.net;database=rowm;
cli.azext_serviceconnector_passwordless._credential_free: Connecting to database...
cli.azure.cli.core.extension.operations: Running: ['/usr/bin/python3.12', '-m', 'pip', 'install', 'pyodbc', '--disable-pip-version-check', '--no-cache-dir']
cli.azure.cli.core.extension.operations: Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pyodbc in ./.local/lib/python3.12/site-packages (5.2.0)
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 584, in create_aad_user_in_sql
import pyodbc
ModuleNotFoundError: No module named 'pyodbc'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 666, in execute
raise ex
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/custom.py", line 39, in connection_create_ext
return connection_create_func(cmd, client, connection_name, client_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/serviceconnector/custom.py", line 534, in connection_create_func
new_auth_info = enable_mi_for_db_linker(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 146, in enable_mi_for_db_linker
target_handler.create_aad_user()
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 508, in create_aad_user
self.create_aad_user_in_sql(connection_args, query_list)
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 586, in create_aad_user_in_sql
raise ModuleNotFoundError(
ModuleNotFoundError: Dependency pyodbc can't be installed, please install it manually with /usr/bin/python3.12 -m pip install pyodbc.
cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: Dependency pyodbc can't be installed, please install it manually with /usr/bin/python3.12 -m pip install pyodbc.
Traceback (most recent call last):
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 584, in create_aad_user_in_sql
import pyodbc
ModuleNotFoundError: No module named 'pyodbc'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 666, in execute
raise ex
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/custom.py", line 39, in connection_create_ext
return connection_create_func(cmd, client, connection_name, client_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/serviceconnector/custom.py", line 534, in connection_create_func
new_auth_info = enable_mi_for_db_linker(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 146, in enable_mi_for_db_linker
target_handler.create_aad_user()
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 508, in create_aad_user
self.create_aad_user_in_sql(connection_args, query_list)
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 586, in create_aad_user_in_sql
raise ModuleNotFoundError(
ModuleNotFoundError: Dependency pyodbc can't be installed, please install it manually with /usr/bin/python3.12 -m pip install pyodbc.
az_command_data_logger: Dependency pyodbc can't be installed, please install it manually with /usr/bin/python3.12 -m pip install pyodbc.
Traceback (most recent call last):
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 584, in create_aad_user_in_sql
import pyodbc
ModuleNotFoundError: No module named 'pyodbc'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 666, in execute
raise ex
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/custom.py", line 39, in connection_create_ext
return connection_create_func(cmd, client, connection_name, client_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/serviceconnector/custom.py", line 534, in connection_create_func
new_auth_info = enable_mi_for_db_linker(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 146, in enable_mi_for_db_linker
target_handler.create_aad_user()
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 508, in create_aad_user
self.create_aad_user_in_sql(connection_args, query_list)
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 586, in create_aad_user_in_sql
raise ModuleNotFoundError(
ModuleNotFoundError: Dependency pyodbc can't be installed, please install it manually with /usr/bin/python3.12 -m pip install pyodbc.
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fdc44ac09a0>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 6.900 seconds (init: 0.321, invoke: 6.579)
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 8580 in cache file under /home/t/.azure/telemetry/20250426224810225
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/usr/bin/python3.12 /usr/lib/az/lib/python3.12/site-packages/azure/cli/telemetry/init.py /home/t/.azure /home/t/.azure/telemetry/20250426224810225"
telemetry.process: Return from creating process 5761
telemetry.main: Finish creating telemetry upload process.
t@Azure:~$
Expected behavior
expected webapp added to SQL db. and a connection string
Environment Summary
telemetry.process: Return from creating process 5761
telemetry.main: Finish creating telemetry upload process.
t@Azure:~$ az --version
azure-cli 2.71.0
core 2.71.0
telemetry 1.1.0
Extensions:
ai-examples 0.2.5
ml 2.36.0
serviceconnector-passwordless 3.3.1
ssh 2.0.6
vm-repair 1.0.8
Dependencies:
msal 1.31.2b1
azure-mgmt-resource 23.1.1
Python location '/usr/bin/python3.12'
Config directory '/home/t/.azure'
Extensions directory '/home/t/.azure/cliextensions'
Extensions system directory '/usr/lib/python3.12/site-packages/azure-cli-extensions'
Python (Linux) 3.12.9 (main, Mar 11 2025, 15:30:57) [GCC 13.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
No response
Describe the bug
adding a sql connection to web app failed with missing pyodbc package
from "create on cloud shell" button on the portal create connection
Related command
az webapp connection create sql --connection sql_658b7 --source-id /subscriptions//resourceGroups/D-prod/providers/Microsoft.Web/sites/D --target-id /subscriptions//resourceGroups/D-prod/providers/Microsoft.Sql/servers/d-prod-sqlserver/databases/r --client-type dotnet --system-identity
Errors
ModuleNotFoundError: Dependency pyodbc can't be installed, please install it manually with
/usr/bin/python3.12 -m pip install pyodbc.To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
tui_chan@Azure:~$ /usr/bin/python3.12 -m pip install pyodbc
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pyodbc in ./.local/lib/python3.12/site-packages (5.2.0)
Issue script & Debug output
az webapp connection create sql --connection sql_658b7 --source-id "/subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Web/sites/D-rowm" --target-id "/subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Sql/servers/D-prod-sqlserver/databases/rowm" --client-type dotnet --system-identity --debug
cli.knack.cli: Command arguments: ['webapp', 'connection', 'create', 'sql', '--connection', 'sql_658b7', '--source-id', '/subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Web/sites/D-rowm', '--target-id', '/subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Sql/servers/D-prod-sqlserver/databases/rowm', '--client-type', 'dotnet', '--system-identity', '--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 0x7fdc45c86020>, <function OutputProducer.on_global_arguments at 0x7fdc4597f740>, <function CLIQuery.on_global_arguments at 0x7fdc459bccc0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'webapp': ['azure.cli.command_modules.appservice', 'azure.cli.command_modules.serviceconnector', 'azext_serviceconnector_passwordless']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: appservice 0.300 80 277
cli.azure.cli.core: serviceconnector 0.182 20 323
cli.azure.cli.core: Total (2) 0.483 100 600
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: ai-examples 0.143 1 1 /usr/lib/python3.12/site-packages/azure-cli-extensions/ai-examples
cli.azure.cli.core: serviceconnector-passwordless 0.120 14 18 /home/t/.azure/cliextensions/serviceconnector-passwordless
cli.azure.cli.core: Total (2) 0.263 15 19
cli.azure.cli.core: Loaded 99 groups, 601 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : webapp connection create sql
cli.azure.cli.core: Command table: webapp connection create sql
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fdc44ac0720>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/t/.azure/commands/2025-04-26.22-48-04.webapp_connection_create_sql.5743.log'.
az_command_data_logger: command args: webapp connection create sql --connection {} --source-id {} --target-id {} --client-type {} --system-identity --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7fdc44b3c360>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7fdc44b3c400>, <function register_cache_arguments..add_cache_arguments at 0x7fdc44b3c540>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7fdc44b3c5e0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fdc4597f7e0>, <function CLIQuery.handle_query_parameter at 0x7fdc459bcd60>, <function register_ids_argument..parse_ids_arguments at 0x7fdc44b3c4a0>]
az_command_data_logger: extension name: serviceconnector-passwordless
az_command_data_logger: extension version: 3.3.1
cli.azure.cli.core.commands: The behavior of this command has been altered by the following extension: serviceconnector-passwordless
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ServiceLinkerManagementClient
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/common/
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool: https://login.microsoftonline.com:443 "GET /common//v2.0/.well-known/openid-configuration HTTP/1.1" 200 1547
msal.authority: openid_config("https://login.microsoftonline.com/common//v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/common/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/{tenantid}/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/common/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/common/kerberos', 'tenant_region_scope': None, '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? None
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.knack.cli: Command arguments: ['account', 'show', '-o', 'json']
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 0x7fdc45c86020>, <function OutputProducer.on_global_arguments at 0x7fdc4597f740>, <function CLIQuery.on_global_arguments at 0x7fdc459bccc0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'account': ['azure.cli.command_modules.profile', 'azure.cli.command_modules.resource']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: profile 0.022 2 8
cli.azure.cli.core: resource 0.028 52 232
cli.azure.cli.core: Total (2) 0.050 54 240
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: ai-examples 0.002 1 1 /usr/lib/python3.12/site-packages/azure-cli-extensions/ai-examples
cli.azure.cli.core: Total (1) 0.002 1 1
cli.azure.cli.core: Loaded 54 groups, 241 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : account show
cli.azure.cli.core: Command table: account show
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fdc44ac0720>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/t/.azure/commands/2025-04-26.22-48-04.account_show.5743.log'.
az_command_data_logger: command args: account show -o {}
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7fdc43c40900>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7fdc43c409a0>, <function register_cache_arguments..add_cache_arguments at 0x7fdc43c40ae0>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7fdc43c40b80>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fdc4597f7e0>, <function CLIQuery.handle_query_parameter at 0x7fdc459bcd60>, <function register_ids_argument..parse_ids_arguments at 0x7fdc43c40a40>]
cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7fdc44b10b80>, <function _x509_from_base64_to_hex_transform at 0x7fdc44b10c20>]
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fdc44ac09a0>]
az_command_data_logger: exit code: 0
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.knack.cli: Command arguments: ['account', 'show', '-o', 'json']
cli.knack.cli: init debug log:
Enable color in terminal.
az_command_data_logger: exit code: 0
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.knack.cli: Command arguments: ['sql', 'server', 'ad-admin', 'list', '--ids', '/subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Sql/servers/D-prod-sqlserver/databases/rowm', '-o', 'json']
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 0x7fdc45c86020>, <function OutputProducer.on_global_arguments at 0x7fdc4597f740>, <function CLIQuery.on_global_arguments at 0x7fdc459bccc0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'sql': ['azure.cli.command_modules.sql', 'azure.cli.command_modules.sqlvm']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: sql 0.012 56 215
cli.azure.cli.core: sqlvm 0.001 4 20
cli.azure.cli.core: Total (2) 0.013 60 235
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: ai-examples 0.001 1 1 /usr/lib/python3.12/site-packages/azure-cli-extensions/ai-examples
cli.azure.cli.core: Total (1) 0.001 1 1
cli.azure.cli.core: Loaded 60 groups, 236 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : sql server ad-admin list
cli.azure.cli.core: Command table: sql server ad-admin list
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fdc44ac0720>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/t/.azure/commands/2025-04-26.22-48-08.sql_server_ad-admin_list.5743.log'.
az_command_data_logger: command args: sql server ad-admin list --ids {} -o {}
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7fdc40502520>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7fdc40502700>, <function register_cache_arguments..add_cache_arguments at 0x7fdc40502840>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7fdc405028e0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fdc4597f7e0>, <function CLIQuery.handle_query_parameter at 0x7fdc459bcd60>, <function register_ids_argument..parse_ids_arguments at 0x7fdc405027a0>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=SqlManagementClient
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/common/
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool: https://login.microsoftonline.com:443 "GET /common//v2.0/.well-known/openid-configuration HTTP/1.1" 200 1547
msal.authority: openid_config("https://login.microsoftonline.com/common//v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/common/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/{tenantid}/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/common/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/common/kerberos', 'tenant_region_scope': None, '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? None
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token_info: scopes=('https://management.core.windows.net//.default',), options={}
cli.azure.cli.core.auth.msal_credentials: CloudShellCredential.acquire_token: scopes=['https://management.core.windows.net//.default'], kwargs={}
urllib3.connectionpool: Starting new HTTP connection (1): localhost:50342
urllib3.connectionpool: http://localhost:50342 "POST /oauth2/token HTTP/1.1" 200 2752
msal.token_cache: event={
"authority_type": "CLOUDSHELL",
"client_id": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
"data": {},
"response": {
"access_token": "",
"client_info": "eyJ1aWQiOiAiM2FlOGFhNTAtMTRlNC00OWMzLWExNTAtNjBiOTI3NTA4ZTdiIiwgInV0aWQiOiAiYTQzOTBlMWMtNjYxZi00Y2FiLWExY2QtYTJhOWQ4NTA4Yjk4In0=",
"expires_in": 1897,
"id_token_claims": "",
"token_type": "Bearer"
},
"scope": [
"https://management.core.windows.net//.default"
],
"token_endpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/token"
}
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Sql/servers/D-prod-sqlserver/administrators?api-version=2020-11-01-preview'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '85f740d8-22f0-11f0-a257-00155d97d99c'
cli.azure.cli.core.sdk.policies: 'CommandName': 'sql server ad-admin list'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--ids -o'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.71.0 (RPM) azsdk-python-core/1.31.0 Python/3.12.9 (Linux-6.1.124.1-microsoft-standard-x86_64-with-glibc2.38) cloud-shell/1.0 CliExtension/serviceconnector-passwordless(3.3.1)'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/a656_/resourceGroups/D-prod/providers/Microsoft.Sql/servers/D-prod-sqlserver/administrators?api-version=2020-11-01-preview HTTP/1.1" 200 432
cli.azure.cli.core.sdk.policies: Response status: 200
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': '432'
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-request-id': '0f59ae1e-c46a-4f56-9dc8-f2497e5cc7eb'
cli.azure.cli.core.sdk.policies: 'x-ms-operation-identifier': 'tenantId=a4390e1c-661f-4cab-a1cd-a2a9d8508b98,objectId=3ae8aa50-14e4-49c3-a150-60b927508e7b/eastus2/f6cfca1e-30fb-441a-b017-2b5d6c2b3c1b'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-reads': '249'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '48e79b62-f85d-41fc-b409-b3e170255a15'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'EASTUS2:20250426T224808Z:48e79b62-f85d-41fc-b409-b3e170255a15'
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: 'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: 83FB3B5A9A6347EA856AC094F54144BB Ref B: BL2AA2011004054 Ref C: 2025-04-26T22:48:08Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Sat, 26 Apr 2025 22:48:08 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fdc44ac09a0>]
az_command_data_logger: exit code: 0
cli.azure.cli.core: Current cloud config:
AzureCloud
cli.knack.cli: Command arguments: ['account', 'get-access-token', '--output', 'json', '--resource', 'https://database.windows.net/', '-o', 'json']
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 0x7fdc45c86020>, <function OutputProducer.on_global_arguments at 0x7fdc4597f740>, <function CLIQuery.on_global_arguments at 0x7fdc459bccc0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'account': ['azure.cli.command_modules.profile', 'azure.cli.command_modules.resource']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: profile 0.001 2 8
cli.azure.cli.core: resource 0.013 52 232
cli.azure.cli.core: Total (2) 0.014 54 240
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: ai-examples 0.001 1 1 /usr/lib/python3.12/site-packages/azure-cli-extensions/ai-examples
cli.azure.cli.core: Total (1) 0.001 1 1
cli.azure.cli.core: Loaded 54 groups, 241 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : account get-access-token
cli.azure.cli.core: Command table: account get-access-token
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fdc44ac0720>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/t/.azure/commands/2025-04-26.22-48-08.account_get-access-token.5743.log'.
az_command_data_logger: command args: account get-access-token --output {} --resource {} -o {}
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7fdc42cd9440>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7fdc42cd93a0>, <function register_cache_arguments..add_cache_arguments at 0x7fdc42cd9260>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x7fdc42cd91c0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fdc4597f7e0>, <function CLIQuery.handle_query_parameter at 0x7fdc459bcd60>, <function register_ids_argument..parse_ids_arguments at 0x7fdc42cd9300>]
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/common/
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool: https://login.microsoftonline.com:443 "GET /common//v2.0/.well-known/openid-configuration HTTP/1.1" 200 1547
msal.authority: openid_config("https://login.microsoftonline.com/common//v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/common/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/{tenantid}/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/common/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/common/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/common/kerberos', 'tenant_region_scope': None, '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? None
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://database.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_credentials: CloudShellCredential.acquire_token: scopes=['https://database.windows.net//.default'], kwargs={}
urllib3.connectionpool: Starting new HTTP connection (1): localhost:50342
urllib3.connectionpool: http://localhost:50342 "POST /oauth2/token HTTP/1.1" 200 2462
msal.token_cache: event={
"authority_type": "CLOUDSHELL",
"client_id": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
"data": {},
"response": {
"access_token": "",
"client_info": "eyJ1aWQiOiAiM2FlOGFhNTAtMTRlNC00OWMzLWExNTAtNjBiOTI3NTA4ZTdiIiwgInV0aWQiOiAiYTQzOTBlMWMtNjYxZi00Y2FiLWExY2QtYTJhOWQ4NTA4Yjk4In0=",
"expires_in": 1040,
"id_token_claims": "",
"token_type": "Bearer"
},
"scope": [
"https://database.windows.net//.default"
],
"token_endpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/token"
}
cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x7fdc44b10b80>, <function _x509_from_base64_to_hex_transform at 0x7fdc44b10c20>]
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fdc44ac09a0>]
az_command_data_logger: exit code: 0
cli.azext_serviceconnector_passwordless._credential_free: DRIVER={{{driver}}};server=D-prod-sqlserver.database.windows.net;database=rowm;
cli.azext_serviceconnector_passwordless._credential_free: Connecting to database...
cli.azure.cli.core.extension.operations: Running: ['/usr/bin/python3.12', '-m', 'pip', 'install', 'pyodbc', '--disable-pip-version-check', '--no-cache-dir']
cli.azure.cli.core.extension.operations: Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pyodbc in ./.local/lib/python3.12/site-packages (5.2.0)
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 584, in create_aad_user_in_sql
import pyodbc
ModuleNotFoundError: No module named 'pyodbc'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 666, in execute
raise ex
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/custom.py", line 39, in connection_create_ext
return connection_create_func(cmd, client, connection_name, client_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/serviceconnector/custom.py", line 534, in connection_create_func
new_auth_info = enable_mi_for_db_linker(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 146, in enable_mi_for_db_linker
target_handler.create_aad_user()
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 508, in create_aad_user
self.create_aad_user_in_sql(connection_args, query_list)
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 586, in create_aad_user_in_sql
raise ModuleNotFoundError(
ModuleNotFoundError: Dependency pyodbc can't be installed, please install it manually with
/usr/bin/python3.12 -m pip install pyodbc.cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: Dependency pyodbc can't be installed, please install it manually with
/usr/bin/python3.12 -m pip install pyodbc.Traceback (most recent call last):
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 584, in create_aad_user_in_sql
import pyodbc
ModuleNotFoundError: No module named 'pyodbc'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 666, in execute
raise ex
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/custom.py", line 39, in connection_create_ext
return connection_create_func(cmd, client, connection_name, client_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/serviceconnector/custom.py", line 534, in connection_create_func
new_auth_info = enable_mi_for_db_linker(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 146, in enable_mi_for_db_linker
target_handler.create_aad_user()
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 508, in create_aad_user
self.create_aad_user_in_sql(connection_args, query_list)
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 586, in create_aad_user_in_sql
raise ModuleNotFoundError(
ModuleNotFoundError: Dependency pyodbc can't be installed, please install it manually with
/usr/bin/python3.12 -m pip install pyodbc.az_command_data_logger: Dependency pyodbc can't be installed, please install it manually with
/usr/bin/python3.12 -m pip install pyodbc.Traceback (most recent call last):
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 584, in create_aad_user_in_sql
import pyodbc
ModuleNotFoundError: No module named 'pyodbc'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib64/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 666, in execute
raise ex
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/custom.py", line 39, in connection_create_ext
return connection_create_func(cmd, client, connection_name, client_type,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/az/lib/python3.12/site-packages/azure/cli/command_modules/serviceconnector/custom.py", line 534, in connection_create_func
new_auth_info = enable_mi_for_db_linker(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 146, in enable_mi_for_db_linker
target_handler.create_aad_user()
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 508, in create_aad_user
self.create_aad_user_in_sql(connection_args, query_list)
File "/home/t/.azure/cliextensions/serviceconnector-passwordless/azext_serviceconnector_passwordless/_credential_free.py", line 586, in create_aad_user_in_sql
raise ModuleNotFoundError(
ModuleNotFoundError: Dependency pyodbc can't be installed, please install it manually with
/usr/bin/python3.12 -m pip install pyodbc.To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fdc44ac09a0>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 6.900 seconds (init: 0.321, invoke: 6.579)
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 8580 in cache file under /home/t/.azure/telemetry/20250426224810225
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/usr/bin/python3.12 /usr/lib/az/lib/python3.12/site-packages/azure/cli/telemetry/init.py /home/t/.azure /home/t/.azure/telemetry/20250426224810225"
telemetry.process: Return from creating process 5761
telemetry.main: Finish creating telemetry upload process.
t@Azure:~$
Expected behavior
expected webapp added to SQL db. and a connection string
Environment Summary
telemetry.process: Return from creating process 5761
telemetry.main: Finish creating telemetry upload process.
t@Azure:~$ az --version
azure-cli 2.71.0
core 2.71.0
telemetry 1.1.0
Extensions:
ai-examples 0.2.5
ml 2.36.0
serviceconnector-passwordless 3.3.1
ssh 2.0.6
vm-repair 1.0.8
Dependencies:
msal 1.31.2b1
azure-mgmt-resource 23.1.1
Python location '/usr/bin/python3.12'
Config directory '/home/t/.azure'
Extensions directory '/home/t/.azure/cliextensions'
Extensions system directory '/usr/lib/python3.12/site-packages/azure-cli-extensions'
Python (Linux) 3.12.9 (main, Mar 11 2025, 15:30:57) [GCC 13.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
No response