Skip to content

az monitor log-analytics workspace table create | Fails with table not found #31712

@trs1991

Description

@trs1991

Describe the bug

When attempting to create a new log analytics table using the following command:

az monitor log-analytics workspace table create --resource-group $rg --workspace-name $law -n DroneLogs_CL --retention-time 30 --columns TimeGenerated=datatime FilePath=string RawData=string

I am receiving the following error:

(ResourceNotFound) The specified table: 'DroneLogs_CL' was not found. Please make sure proper table name is used. Operation Id: 'be8b073e941e1cbc09872ca8167e4d22'
Code: ResourceNotFound
Message: The specified table: 'DroneLogs_CL' was not found. Please make sure proper table name is used. Operation Id: 'be8b073e941e1cbc09872ca8167e4d22'

Which is odd since of course the table was not found because i am trying to create it!

Related command

az monitor log-analytics workspace table create

Errors

(ResourceNotFound) The specified table: 'DroneLogs_CL' was not found. Please make sure proper table name is used. Operation Id: 'be8b073e941e1cbc09872ca8167e4d22'
Code: ResourceNotFound
Message: The specified table: 'DroneLogs_CL' was not found. Please make sure proper table name is used. Operation Id: 'be8b073e941e1cbc09872ca8167e4d22'

Issue script & Debug output

cli.knack.cli: Command arguments: ['monitor', 'log-analytics', 'workspace', 'table', 'create', '--resource-group', 'pd-appservice', '--workspace-name', 'pd-logs', '-n', 'DroneLogs_CL', '--retention-time', '30', '--columns', 'TimeGenerated=datatime', 'FilePath=string', 'RawData=string', '--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 0x000002ADBC93F420>, <function OutputProducer.on_global_arguments at 0x000002ADBCCDC2C0>, <function CLIQuery.on_global_arguments at 0x000002ADBCD016C0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'monitor': ['azure.cli.command_modules.monitor']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: monitor 1.079 27 93
cli.azure.cli.core: Total (1) 1.079 27 93
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: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 27 groups, 93 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : monitor log-analytics workspace table create
cli.azure.cli.core: Command table: monitor log-analytics workspace table create
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000002ADBF05B2E0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\tsmith.azure\commands\2025-06-25.11-56-35.monitor_log-analytics_workspace_table_create.18028.log'.
az_command_data_logger: command args: monitor log-analytics workspace table create --resource-group {} --workspace-name {} -n {} --retention-time {} --columns {} {} {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x000002ADBF087E20>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x000002ADBF0C63E0>, <function register_cache_arguments..add_cache_arguments at 0x000002ADBF0C6520>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x000002ADBF0C65C0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000002ADBCCDC360>, <function CLIQuery.handle_query_parameter at 0x000002ADBCD01760>, <function register_ids_argument..parse_ids_arguments at 0x000002ADBF0C6480>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=LogAnalyticsManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\tsmith\.azure\msal_token_cache.bin', encrypt=True
cli.azure.cli.core.auth.binary_cache: load: C:\Users\tsmith.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: Initializing with Entra authority: https://login.microsoftonline.com/357d8611-d6cc-4dd1-a674-7481a8e465f4
msal.authority: openid_config("https://login.microsoftonline.com/357d8611-d6cc-4dd1-a674-7481a8e465f4/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/357d8611-d6cc-4dd1-a674-7481a8e465f4/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/357d8611-d6cc-4dd1-a674-7481a8e465f4/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/357d8611-d6cc-4dd1-a674-7481a8e465f4/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/357d8611-d6cc-4dd1-a674-7481a8e465f4/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/357d8611-d6cc-4dd1-a674-7481a8e465f4/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/357d8611-d6cc-4dd1-a674-7481a8e465f4/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/357d8611-d6cc-4dd1-a674-7481a8e465f4/kerberos', 'tenant_region_scope': 'EU', '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? True
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/357d8611-d6cc-4dd1-a674-7481a8e465f4
msal.authority: openid_config("https://login.microsoftonline.com/357d8611-d6cc-4dd1-a674-7481a8e465f4/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/357d8611-d6cc-4dd1-a674-7481a8e465f4/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/357d8611-d6cc-4dd1-a674-7481a8e465f4/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/357d8611-d6cc-4dd1-a674-7481a8e465f4/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/357d8611-d6cc-4dd1-a674-7481a8e465f4/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/357d8611-d6cc-4dd1-a674-7481a8e465f4/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/357d8611-d6cc-4dd1-a674-7481a8e465f4/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/357d8611-d6cc-4dd1-a674-7481a8e465f4/kerberos', 'tenant_region_scope': 'EU', '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? True
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_credentials: UserCredential.acquire_token: scopes=['https://management.core.windows.net//.default'], claims_challenge=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: eb4c49e9-ad9d-4d73-be4f-be1ea4b2980f
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/a59f4887-79ed-4346-8148-f83267f308f7/resourceGroups/pd-appservice/providers/Microsoft.OperationalInsights/workspaces/pd-logs/tables/DroneLogs_CL?api-version=2022-10-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: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'Content-Length': '214'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '0ef127e2-51b3-11f0-894d-9cebe84849b0'
cli.azure.cli.core.sdk.policies: 'CommandName': 'monitor log-analytics workspace table create'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--resource-group --workspace-name -n --retention-time --columns --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.74.0 (MSI) azsdk-python-core/1.31.0 Python/3.12.10 (Windows-11-10.0.26100-SP0)'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"properties": {"retentionInDays": 30, "schema": {"columns": [{"name": "TimeGenerated", "type": "datatime"}, {"name": "FilePath", "type": "string"}, {"name": "RawData", "type": "string"}], "name": "DroneLogs_CL"}}}
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/a59f4887-79ed-4346-8148-f83267f308f7/resourceGroups/pd-appservice/providers/Microsoft.OperationalInsights/workspaces/pd-logs/tables/DroneLogs_CL?api-version=2022-10-01 HTTP/1.1" 400 193
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-store, no-cache'
cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies: 'Content-Length': '193'
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies: 'Expires': '-1'
cli.azure.cli.core.sdk.policies: 'x-ms-operation-identifier': 'tenantId=357d8611-d6cc-4dd1-a674-7481a8e465f4,objectId=43e4d58a-cb54-48a4-9b9b-b5e99e33a706/uksouth/17f6d7c4-6e46-4b9a-8e09-edf76dd2eb4d'
cli.azure.cli.core.sdk.policies: 'Diagnostic-Context': '03f5abd374268151684eba7397b513c3'
cli.azure.cli.core.sdk.policies: 'api-supported-versions': '2015-03-20, 2015-11-01-preview, 2017-01-01-preview, 2017-03-03-preview, 2017-03-15-preview, 2017-04-26-preview, 2020-03-01-preview, 2020-08-01, 2020-10-01, 2021-03-01-privatepreview, 2021-07-01-privatepreview, 2021-12-01-preview, 2022-09-01-privatepreview, 2022-10-01, 2023-01-01-preview, 2023-09-01, 2025-02-01, 2025-04-01'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'Access-Control-Allow-Origin': '*'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '199'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-writes': '2999'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': 'c9b6a0dc-b6cd-4d02-b050-c2c6655e841c'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'c9b6a0dc-b6cd-4d02-b050-c2c6655e841c'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'UKSOUTH:20250625T105637Z:c9b6a0dc-b6cd-4d02-b050-c2c6655e841c'
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: E9F4933B5ADE44858F9EEC228737AA81 Ref B: AMS231020615027 Ref C: 2025-06-25T10:56:36Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Wed, 25 Jun 2025 10:56:36 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"error":{"code":"ResourceNotFound","message":"The specified table: 'DroneLogs_CL' was not found. Please make sure proper table name is used. Operation Id: '03f5abd374268151684eba7397b513c3'"}}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 666, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 726, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/monitor/_exception_handler.py", line 23, in exception_handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 714, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 1079, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 1066, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_poller.py", line 108, in result
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 94, in wrapper_use_tracer
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_poller.py", line 130, in wait
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_poller.py", line 83, in _start
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/monitor/aaz/latest/monitor/log_analytics/workspace/table/_create.py", line 199, in _execute_operations
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/monitor/aaz/latest/monitor/log_analytics/workspace/table/_create.py", line 239, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_operation.py", line 327, in on_error
azure.core.exceptions.HttpResponseError: (ResourceNotFound) The specified table: 'DroneLogs_CL' was not found. Please make sure proper table name is used. Operation Id: '03f5abd374268151684eba7397b513c3'
Code: ResourceNotFound
Message: The specified table: 'DroneLogs_CL' was not found. Please make sure proper table name is used. Operation Id: '03f5abd374268151684eba7397b513c3'

Expected behavior

I would expect the command to succeed and create a new table in the log analytics workspace

Environment Summary

az --version
azure-cli 2.74.0

core 2.74.0
telemetry 1.1.0

Extensions:
k8s-extension 1.6.5
ssh 2.0.6

Dependencies:
msal 1.32.3
azure-mgmt-resource 23.3.0

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\tsmith.azure'
Extensions directory 'C:\Users\tsmith.azure\cliextensions'

Python (Windows) 3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamMonitoraz monitorcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions