Azure / azure-cli

Azure Command-Line Interface
MIT License
4.01k stars 2.99k forks source link

az keyvault create gives "Bad JSON content found in the request." #8840

Closed yooakim closed 5 years ago

yooakim commented 5 years ago

I'm trying to create a new keyvault using AZ CLI. My command line is as follows:

 az keyvault create -n 'comet-key-vault' -g 'jun-mgmt' --enable-soft-delete true --enabled-for-deployment true --enabled-for-template-deployment true 

the response I get is:

Bad JSON content found in the request.

I am using AZ CLI on Windows, versions as follows:

azure-cli                         2.0.60
keyvault                          2.2.12

I am not able to see what is wrong in the request. Anyone here who can help?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

tjprescott commented 5 years ago

If you are running on Windows Command Prompt, you cannot use single quotes. Use double quotes.

yooakim commented 5 years ago

If you are running on Windows Command Prompt, you cannot use single quotes. Use double quotes. Thanks but I am using PowerShell, so the quotes are ok.

tjprescott commented 5 years ago

Please run your comment with --debug and paste the first line of output. It will look something like this: Command arguments: ['group', 'show', '--debug']

stephanmax commented 5 years ago

I am having the same issue (aks-engine Version: v0.34.1, GitCommit: e68d84850):

$ az keyvault create -g test-stephan -n env-stephan-kv --debug

Command arguments: ['keyvault', 'create', '-g', 'test-stephan', '-n', 'env-stephan-kv', '--debug']
Event: Cli.PreExecute []
Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x106ab4268>, <function OutputProducer.on_global_arguments at 0x106b4b0d0>, <function CLIQuery.on_global_arguments at 0x106b5b6a8>]
Event: CommandInvoker.OnPreCommandTableCreate []
Installed command modules ['acr', 'acs', 'advisor', 'ams', 'appservice', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'configure', 'consumption', 'container', 'cosmosdb', 'deploymentmanager', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'interactive', 'iot', 'iotcentral', 'keyvault', 'kusto', 'lab', 'maps', 'monitor', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'reservations', 'resource', 'role', 'search', 'security', 'servicebus', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'vm']
Loaded module 'acr' in 0.006 seconds.
Loaded module 'acs' in 0.004 seconds.
Loaded module 'advisor' in 0.002 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'ams' in 0.006 seconds.
Loaded module 'appservice' in 0.018 seconds.
Loaded module 'backup' in 0.004 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'batch' in 0.010 seconds.
Loaded module 'batchai' in 0.006 seconds.
Loaded module 'billing' in 0.003 seconds.
Loaded module 'botservice' in 0.004 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'cdn' in 0.003 seconds.
Loaded module 'cloud' in 0.002 seconds.
Loaded module 'cognitiveservices' in 0.002 seconds.
Loaded module 'configure' in 0.002 seconds.
Loaded module 'consumption' in 0.004 seconds.
Loaded module 'container' in 0.003 seconds.
Loaded module 'cosmosdb' in 0.005 seconds.
Loaded module 'deploymentmanager' in 0.004 seconds.
Loaded module 'dla' in 0.007 seconds.
Loaded module 'dls' in 0.004 seconds.
Loaded module 'dms' in 0.003 seconds.
Loaded module 'eventgrid' in 0.003 seconds.
Loaded module 'eventhubs' in 0.004 seconds.
Loaded module 'extension' in 0.001 seconds.
Loaded module 'feedback' in 0.001 seconds.
Loaded module 'find' in 0.001 seconds.
Loaded module 'hdinsight' in 0.003 seconds.
Loaded module 'interactive' in 0.001 seconds.
Loaded module 'iot' in 0.004 seconds.
Loaded module 'iotcentral' in 0.002 seconds.
Loaded module 'keyvault' in 0.007 seconds.
Loaded module 'kusto' in 0.003 seconds.
Loaded module 'lab' in 0.004 seconds.
Loaded module 'maps' in 0.002 seconds.
Loaded module 'monitor' in 0.006 seconds.
Loaded module 'network' in 0.026 seconds.
Loaded module 'policyinsights' in 0.003 seconds.
Loaded module 'privatedns' in 0.005 seconds.
Loaded module 'profile' in 0.002 seconds.
Loaded module 'rdbms' in 0.005 seconds.
Loaded module 'redis' in 0.003 seconds.
Loaded module 'relay' in 0.003 seconds.
Loaded module 'reservations' in 0.002 seconds.
Loaded module 'resource' in 0.007 seconds.
Loaded module 'role' in 0.005 seconds.
Loaded module 'search' in 0.003 seconds.
Loaded module 'security' in 0.003 seconds.
Loaded module 'servicebus' in 0.004 seconds.
Loaded module 'servicefabric' in 0.002 seconds.
Loaded module 'signalr' in 0.002 seconds.
Loaded module 'sql' in 0.007 seconds.
Loaded module 'sqlvm' in 0.005 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'storage' in 0.031 seconds.
Loaded module 'vm' in 0.015 seconds.
Loaded all modules in 0.279 seconds. (note: there's always an overhead with the first module loaded)
Extensions directory: '/Users/smax/.azure/cliextensions'
Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x106be82f0>]
az_command_data_logger : command args: keyvault create -g {} -n {} --debug
metadata file logging enabled - writing logs to '/Users/smax/.azure/commands'.
msrestazure.azure_active_directory : Cannot load 'keyring' on your system (either not installed, or not configured correctly): No module named 'entrypoints'
Configured default 'northeurope' for arg location
Event: CommandInvoker.OnPostCommandTableCreate [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x106c0b268>, <function register_ids_argument.<locals>.add_ids_arguments at 0x106c3aae8>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x106c3ac80>]
Event: CommandInvoker.OnCommandTableLoaded []
Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x107acbbf8>]
Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x106b4b158>, <function CLIQuery.handle_query_parameter at 0x106b5b730>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x106c3ab70>, <function handler at 0x107bd4840>]
Getting management service client client_type=KeyVaultManagementClient
msrest.universal_http.requests : Configuring retry: max_retries=4, backoff_factor=0.8, max_backoff=90
msrest.universal_http.requests : Configuring retry: max_retries=4, backoff_factor=0.8, max_backoff=90
attempting to read file /Users/smax/.azure/accessTokens.json as utf-8-sig
adal-python : a70cf8b5-227b-46c8-affb-c96eda5dc905 - Authority:Performing instance discovery: ...
adal-python : a70cf8b5-227b-46c8-affb-c96eda5dc905 - Authority:Performing static instance discovery
adal-python : a70cf8b5-227b-46c8-affb-c96eda5dc905 - Authority:Authority validated via static instance discovery
adal-python : a70cf8b5-227b-46c8-affb-c96eda5dc905 - TokenRequest:Getting token from cache with refresh if necessary.
adal-python : a70cf8b5-227b-46c8-affb-c96eda5dc905 - CacheDriver:finding with query keys: {'_clientId': '...', 'userId': '...'}
adal-python : a70cf8b5-227b-46c8-affb-c96eda5dc905 - CacheDriver:Looking for potential cache entries: {'_clientId': '...', 'userId': '...'}
adal-python : a70cf8b5-227b-46c8-affb-c96eda5dc905 - CacheDriver:Found 2 potential entries.
adal-python : a70cf8b5-227b-46c8-affb-c96eda5dc905 - CacheDriver:Resource specific token found.
adal-python : a70cf8b5-227b-46c8-affb-c96eda5dc905 - CacheDriver:Returning token from cache lookup, AccessTokenId: b'cRYMkLXyqG196VKXzLzKMzxx92cL/NyQVUl05AAkob0=', RefreshTokenId: b'ZnhARpThbIjGhl/m001gPLGRlc1sSO+CcMLHlGoqlzw='
msrest.universal_http : Configuring redirects: allow=True, max=30
msrest.universal_http : Configuring request: timeout=100, verify=True, cert=None
msrest.universal_http : Configuring proxies: ''
msrest.universal_http : Evaluate proxies against ENV settings: True
urllib3.connectionpool : Starting new HTTPS connection (1): graph.windows.net:443
urllib3.connectionpool : https://graph.windows.net:443 "GET /<tenantId_removed>/me?api-version=1.6 HTTP/1.1" 200 1683
msrest.service_client : Accept header absent and forced to application/json
adal-python : 3f509253-5a2a-4c89-b434-5a12ecb05419 - Authority:Performing instance discovery: ...
adal-python : 3f509253-5a2a-4c89-b434-5a12ecb05419 - Authority:Performing static instance discovery
adal-python : 3f509253-5a2a-4c89-b434-5a12ecb05419 - Authority:Authority validated via static instance discovery
adal-python : 3f509253-5a2a-4c89-b434-5a12ecb05419 - TokenRequest:Getting token from cache with refresh if necessary.
adal-python : 3f509253-5a2a-4c89-b434-5a12ecb05419 - CacheDriver:finding with query keys: {'_clientId': '...', 'userId': '...'}
adal-python : 3f509253-5a2a-4c89-b434-5a12ecb05419 - CacheDriver:Looking for potential cache entries: {'_clientId': '...', 'userId': '...'}
adal-python : 3f509253-5a2a-4c89-b434-5a12ecb05419 - CacheDriver:Found 2 potential entries.
adal-python : 3f509253-5a2a-4c89-b434-5a12ecb05419 - CacheDriver:Resource specific token found.
adal-python : 3f509253-5a2a-4c89-b434-5a12ecb05419 - CacheDriver:Returning token from cache lookup, AccessTokenId: b'GPkNzoTqQ+J8hpERnokFouFdEnBi6NUaElYtK+COPvM=', RefreshTokenId: b'ZnhARpThbIjGhl/m001gPLGRlc1sSO+CcMLHlGoqlzw='
msrest.http_logger : Request URL: 'https://management.azure.com/subscriptions/<removed>/resourceGroups/test-stephan/providers/Microsoft.KeyVault/vaults/env-stephan-kv?api-version=2018-02-14'
msrest.http_logger : Request method: 'PUT'
msrest.http_logger : Request headers:
msrest.http_logger :     'Accept': 'application/json'
msrest.http_logger :     'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger :     'accept-language': 'en-US'
msrest.http_logger :     'Content-Length': '737'
msrest.http_logger :     'User-Agent': 'python/3.7.3 (Darwin-18.2.0-x86_64-i386-64bit) msrest/0.6.6 msrest_azure/0.4.34 azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.63'
msrest.http_logger : Request body:
msrest.http_logger : {"location": "northeurope", "properties": {"tenantId": "<removed>", "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": "<removed>", "objectId": "ca470180-1a6f-4ff3-8012-14a566ebb1b0", "permissions": {"keys": ["get", "create", "delete", "list", "update", "import", "backup", "restore", "recover"], "secrets": ["get", "list", "set", "delete", "backup", "restore", "recover"], "certificates": ["get", "list", "delete", "create", "import", "update", "managecontacts", "getissuers", "listissuers", "setissuers", "deleteissuers", "manageissuers", "recover"], "storage": ["get", "list", "delete", "set", "update", "regeneratekey", "setsas", "listsas", "getsas", "deletesas"]}}]}}
msrest.universal_http : Configuring redirects: allow=True, max=30
msrest.universal_http : Configuring request: timeout=100, verify=True, cert=None
msrest.universal_http : Configuring proxies: ''
msrest.universal_http : Evaluate proxies against ENV settings: True
urllib3.connectionpool : Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool : https://management.azure.com:443 "PUT /subscriptions/<removed>/resourceGroups/test-stephan/providers/Microsoft.KeyVault/vaults/env-stephan?api-version=2018-02-14 HTTP/1.1" 400 82
msrest.http_logger : Response status: 400
msrest.http_logger : Response headers:
msrest.http_logger :     'Cache-Control': 'no-cache'
msrest.http_logger :     'Pragma': 'no-cache'
msrest.http_logger :     'Content-Length': '82'
msrest.http_logger :     'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger :     'Expires': '-1'
msrest.http_logger :     'x-ms-keyvault-service-version': '1.1.0.244'
msrest.http_logger :     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
msrest.http_logger :     'X-Content-Type-Options': 'nosniff'
msrest.http_logger :     'Server': 'Microsoft-IIS/10.0'
msrest.http_logger :     'X-AspNet-Version': '4.0.30319'
msrest.http_logger :     'X-Powered-By': 'ASP.NET'
msrest.http_logger :     'x-ms-ratelimit-remaining-subscription-writes': '1199'
msrest.http_logger :     'x-ms-request-id': '7a190aa7-6ad5-4759-92dd-6a4de7345397'
msrest.http_logger :     'x-ms-correlation-request-id': '7a190aa7-6ad5-4759-92dd-6a4de7345397'
msrest.http_logger :     'x-ms-routing-request-id': 'FRANCESOUTH:20190506T110805Z:7a190aa7-6ad5-4759-92dd-6a4de7345397'
msrest.http_logger :     'Date': 'Mon, 06 May 2019 11:08:05 GMT'
msrest.http_logger : Response content:
msrest.http_logger : {"error":{"code":"BadRequest","message":"Bad JSON content found in the request."}}
msrest.exceptions : Bad JSON content found in the request.

Do you have any ideas, @tjprescott? Much appreciated!

tjprescott commented 5 years ago

I compared the two request payloads and they were identical (my call succeeded). Can you provide the output of az cloud show?

stephanmax commented 5 years ago

Hey Travis, thanks for looking into this.

{
  "endpoints": {
    "activeDirectory": "https://login.microsoftonline.com",
    "activeDirectoryDataLakeResourceId": "https://datalake.azure.net/",
    "activeDirectoryGraphResourceId": "https://graph.windows.net/",
    "activeDirectoryResourceId": "https://management.core.windows.net/",
    "batchResourceId": "https://batch.core.windows.net/",
    "gallery": "https://gallery.azure.com/",
    "management": "https://management.core.windows.net/",
    "mediaResourceId": "https://rest.media.azure.net",
    "resourceManager": "https://management.azure.com/",
    "sqlManagement": "https://management.core.windows.net:8443/",
    "vmImageAliasDoc": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json"
  },
  "isActive": true,
  "name": "AzureCloud",
  "profile": "latest",
  "suffixes": {
    "acrLoginServerEndpoint": ".azurecr.io",
    "azureDatalakeAnalyticsCatalogAndJobEndpoint": "azuredatalakeanalytics.net",
    "azureDatalakeStoreFileSystemEndpoint": "azuredatalakestore.net",
    "keyvaultDns": ".vault.azure.net",
    "sqlServerHostname": ".database.windows.net",
    "storageEndpoint": "core.windows.net"
  }
}
tjprescott commented 5 years ago

I'm not sure for this one. Since the request payloads matched, I would recommend you open a support ticket on the portal to engage with the service team. I will flag this as a service attention item in the meantime.

its-just-jo commented 5 years ago

Hello @tjprescott , I am getting the same error, during an ARM deployment.

I am using the following template:

{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "keyVaultName": {
      "type": "string",
      "metadata": {
        "description": "Specifies the name of the key vault."
      }
    },
    "location": {
      "type": "string",
      "metadata": {
        "description": "Specifies the Azure location where the key vault should be created."
      }
    },
    "secretName": {
      "type": "string",
      "metadata": {
        "description": "Specifies the name of the secret that you want to create."
      }
    },
    "secretValue": {
      "type": "securestring",
      "metadata": {
        "description": "Specifies the value of the secret that you want to create."
      }
    }
  },
  "variables": {
    "skuName": "Standard",
    "enabledForVMDeployment": false,
    "enabledForDiskEncryption": false,
    "enabledForTemplateDeployment": false,
    "tenantId": "xxx",
    "objectId": "xxx",
    "keysPermissions": "all",
    "secretsPermissions": "all",
  },
  "resources": [
    {
      "type": "Microsoft.KeyVault/vaults",
      "name": "[parameters('keyVaultName')]",
      "apiVersion": "2018-02-14",
      "location": "[parameters('location')]",
      "properties": {
        "enabledForVMDeployment": "[variables('enabledForVMDeployment')]",
        "enabledForDiskEncryption": "[variables('enabledForDiskEncryption')]",
        "enabledForTemplateDeployment": "[variables('enabledForTemplateDeployment')]",
        "tenantId": "[variables('tenantId')]",
        "accessPolicies": [
          {
            "objectId": "[variables('objectId')]",
            "tenantId": "[variables('tenantId')]",
            "permissions": {
              "keys": "[variables('keysPermissions')]",
              "secrets": "[variables('secretsPermissions')]"
            }
          }
        ],
        "sku": {
          "name": "[variables('skuName')]",
          "family": "A"
        },
        "networkAcls": {
          "value": {
            "defaultAction": "Allow",
            "bypass": "AzureServices"
          }
        }
      }
    },
    {
      "type": "Microsoft.KeyVault/vaults/secrets",
      "name": "[concat(parameters('keyVaultName'), '/', parameters('secretName'))]",
      "apiVersion": "2018-02-14",
      "location": "[parameters('location')]",
      "dependsOn": [
        "[resourceId('Microsoft.KeyVault/vaults', parameters('keyVaultName'))]"
      ],
      "properties": {
        "value": "[parameters('secretValue')]"
      }
    }
  ]
}
a30002040 commented 5 years ago

I'm hitting the same issue, in my case deploying from Azure Devops using the ARM template deployment step. I have a theory which I'm about to test, using the same template @its-just-jo provided.

a30002040 commented 5 years ago

Ah, we have different issues. in the case of @its-just-jo, the issue is that the access policy permissions need to be an array, not just a string.

thrustCoder commented 5 years ago

I am seeing the same issue. Here is the debug output:

E:\r\New cert
λ az keyvault create --name "RishiKV" --resource-group "MicroservicePrototype" --location "East US" --debug
Command arguments: ['keyvault', 'create', '--name', 'RishiKV', '--resource-group', 'MicroservicePrototype', '--location', 'East US', '--debug']
Event: Cli.PreExecute []
Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x03D52A08>, <function OutputProducer.on_global_arguments at 0x03C18738>, <function CLIQuery.on_global_arguments at 0x03C35810>]
Event: CommandInvoker.OnPreCommandTableCreate []
Installed command modules ['acr', 'acs', 'advisor', 'ams', 'appservice', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'configure', 'consumption', 'container', 'cosmosdb', 'deploymentmanager', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'interactive', 'iot', 'iotcentral', 'keyvault', 'kusto', 'lab', 'maps', 'monitor', 'natgateway', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'reservations', 'resource', 'role', 'search', 'security', 'servicebus', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'vm']
Loaded module 'acr' in 0.020 seconds.
Loaded module 'acs' in 0.014 seconds.
Loaded module 'advisor' in 0.008 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'ams' in 0.020 seconds.
Loaded module 'appservice' in 0.013 seconds.
Loaded module 'backup' in 0.018 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'batch' in 0.031 seconds.
Loaded module 'batchai' in 0.016 seconds.
Loaded module 'billing' in 0.021 seconds.
Loaded module 'botservice' in 0.014 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'cdn' in 0.018 seconds.
Loaded module 'cloud' in 0.013 seconds.
Loaded module 'cognitiveservices' in 0.008 seconds.
Loaded module 'configure' in 0.007 seconds.
Loaded module 'consumption' in 0.016 seconds.
Loaded module 'container' in 0.014 seconds.
Loaded module 'cosmosdb' in 0.030 seconds.
Loaded module 'deploymentmanager' in 0.009 seconds.
Loaded module 'dla' in 0.019 seconds.
Loaded module 'dls' in 0.014 seconds.
Loaded module 'dms' in 0.009 seconds.
Loaded module 'eventgrid' in 0.007 seconds.
Loaded module 'eventhubs' in 0.023 seconds.
Loaded module 'extension' in 0.007 seconds.
Loaded module 'feedback' in 0.006 seconds.
Loaded module 'find' in 0.013 seconds.
Loaded module 'hdinsight' in 0.010 seconds.
Loaded module 'interactive' in 0.004 seconds.
Loaded module 'iot' in 0.017 seconds.
Loaded module 'iotcentral' in 0.007 seconds.
Loaded module 'keyvault' in 0.024 seconds.
Loaded module 'kusto' in 0.014 seconds.
Loaded module 'lab' in 0.026 seconds.
Loaded module 'maps' in 0.010 seconds.
Loaded module 'monitor' in 0.022 seconds.
Loaded module 'natgateway' in 0.008 seconds.
Loaded module 'network' in 0.082 seconds.
Loaded module 'policyinsights' in 0.010 seconds.
Loaded module 'privatedns' in 0.023 seconds.
Loaded module 'profile' in 0.007 seconds.
Loaded module 'rdbms' in 0.036 seconds.
Loaded module 'redis' in 0.013 seconds.
Loaded module 'relay' in 0.014 seconds.
Loaded module 'reservations' in 0.014 seconds.
Loaded module 'resource' in 0.029 seconds.
Loaded module 'role' in 0.035 seconds.
Loaded module 'search' in 0.013 seconds.
Loaded module 'security' in 0.011 seconds.
Loaded module 'servicebus' in 0.024 seconds.
Loaded module 'servicefabric' in 0.010 seconds.
Loaded module 'signalr' in 0.017 seconds.
Loaded module 'sql' in 0.027 seconds.
Loaded module 'sqlvm' in 0.014 seconds.
Event: CommandLoader.OnLoadCommandTable []
Loaded module 'storage' in 0.099 seconds.
Loaded module 'vm' in 0.044 seconds.
Loaded all modules in 1.051 seconds. (note: there's always an overhead with the first module loaded)
Extensions directory: 'C:\Users\rajsin\.azure\cliextensions'
Found 1 extensions: ['aks-preview']
Extensions directory: 'C:\Users\rajsin\.azure\cliextensions'
Extension compatibility result: is_compatible=True cli_core_version=2.0.66 min_required=2.0.49 max_required=None
Event: CommandLoader.OnLoadCommandTable []
Extensions directory: 'C:\Users\rajsin\.azure\cliextensions'
Loaded extension 'aks-preview' in 0.020 seconds.
Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x03CCCA50>]
az_command_data_logger : command args: keyvault create --name {} --resource-group {} --location {} --debug
metadata file logging enabled - writing logs to 'C:\Users\rajsin\.azure\commands'.
Event: CommandInvoker.OnPostCommandTableCreate [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x03DC2930>, <function register_ids_argument.<locals>.add_ids_arguments at 0x03DC9390>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x03DC9420>]
Event: CommandInvoker.OnCommandTableLoaded []
Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x052A7348>]
Getting management service client client_type=SubscriptionClient
msrest.universal_http.requests : Configuring retry: max_retries=4, backoff_factor=0.8, max_backoff=90
msrest.async_paging : Paging async iterator protocol is not available for LocationPaged
attempting to read file C:\Users\rajsin\.azure\accessTokens.json as utf-8-sig
adal-python : 68e02586-df06-44bb-83d5-3500cc9db25e - Authority:Performing instance discovery: ...
adal-python : 68e02586-df06-44bb-83d5-3500cc9db25e - Authority:Performing static instance discovery
adal-python : 68e02586-df06-44bb-83d5-3500cc9db25e - Authority:Authority validated via static instance discovery
adal-python : 68e02586-df06-44bb-83d5-3500cc9db25e - TokenRequest:Getting a token via certificate.
adal-python : 68e02586-df06-44bb-83d5-3500cc9db25e - SelfSignedJwt:Creating self signed JWT header. x5t: rOdOGfJb6YwjcUNOx05RG5yOf40=, x5c: None
adal-python : 68e02586-df06-44bb-83d5-3500cc9db25e - SelfSignedJwt:Creating self signed JWT payload. Expires: 2019-08-29 15:58:30.056469 NotBefore: 2019-08-29 15:48:30.056469
adal-python : 68e02586-df06-44bb-83d5-3500cc9db25e - TokenRequest:No user_id passed for cache query
adal-python : 68e02586-df06-44bb-83d5-3500cc9db25e - CacheDriver:finding with query keys: {'_clientId': '...'}
adal-python : 68e02586-df06-44bb-83d5-3500cc9db25e - CacheDriver:Looking for potential cache entries: {'_clientId': '...'}
adal-python : 68e02586-df06-44bb-83d5-3500cc9db25e - CacheDriver:Found 0 potential entries.
urllib3.connectionpool : Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool : https://login.microsoftonline.com:443 "POST /microsoft.onmicrosoft.com/oauth2/token HTTP/1.1" 200 1421
adal-python : 68e02586-df06-44bb-83d5-3500cc9db25e - OAuth2Client:Get Token Server returned this correlation_id: 68e02586-df06-44bb-83d5-3500cc9db25e
msrest.http_logger : Request URL: 'https://management.azure.com/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations?api-version=2016-06-01'
msrest.http_logger : Request method: 'GET'
msrest.http_logger : Request headers:
msrest.http_logger :     'Accept': 'application/json'
msrest.http_logger :     'accept-language': 'en-US'
msrest.http_logger :     'User-Agent': 'python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.6 msrest_azure/0.6.0 subscriptionclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.66'
msrest.http_logger : Request body:
msrest.http_logger : None
msrest.universal_http : Configuring redirects: allow=True, max=30
msrest.universal_http : Configuring request: timeout=100, verify=True, cert=None
msrest.universal_http : Configuring proxies: ''
msrest.universal_http : Evaluate proxies against ENV settings: True
urllib3.connectionpool : Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool : https://management.azure.com:443 "GET /subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations?api-version=2016-06-01 HTTP/1.1" 200 1469
msrest.http_logger : Response status: 200
msrest.http_logger : Response headers:
msrest.http_logger :     'Cache-Control': 'no-cache'
msrest.http_logger :     'Pragma': 'no-cache'
msrest.http_logger :     'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger :     'Content-Encoding': 'gzip'
msrest.http_logger :     'Expires': '-1'
msrest.http_logger :     'Vary': 'Accept-Encoding'
msrest.http_logger :     'x-ms-ratelimit-remaining-subscription-reads': '11999'
msrest.http_logger :     'x-ms-request-id': '8639cf3c-f4fb-48f2-ad7e-c8cdb548bb1a'
msrest.http_logger :     'x-ms-correlation-request-id': '8639cf3c-f4fb-48f2-ad7e-c8cdb548bb1a'
msrest.http_logger :     'x-ms-routing-request-id': 'WESTUS:20190829T224831Z:8639cf3c-f4fb-48f2-ad7e-c8cdb548bb1a'
msrest.http_logger :     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
msrest.http_logger :     'X-Content-Type-Options': 'nosniff'
msrest.http_logger :     'Date': 'Thu, 29 Aug 2019 22:48:31 GMT'
msrest.http_logger :     'Content-Length': '1469'
msrest.http_logger : Response content:
msrest.http_logger : {"value":[{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/eastasia","name":"eastasia","displayName":"East Asia","longitude":"114.188","latitude":"22.267"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/southeastasia","name":"southeastasia","displayName":"Southeast Asia","longitude":"103.833","latitude":"1.283"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/centralus","name":"centralus","displayName":"Central US","longitude":"-93.6208","latitude":"41.5908"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/eastus","name":"eastus","displayName":"East US","longitude":"-79.8164","latitude":"37.3719"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/eastus2","name":"eastus2","displayName":"East US 2","longitude":"-78.3889","latitude":"36.6681"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/westus","name":"westus","displayName":"West US","longitude":"-122.417","latitude":"37.783"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/northcentralus","name":"northcentralus","displayName":"North Central US","longitude":"-87.6278","latitude":"41.8819"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/southcentralus","name":"southcentralus","displayName":"South Central US","longitude":"-98.5","latitude":"29.4167"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/northeurope","name":"northeurope","displayName":"North Europe","longitude":"-6.2597","latitude":"53.3478"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/westeurope","name":"westeurope","displayName":"West Europe","longitude":"4.9","latitude":"52.3667"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/japanwest","name":"japanwest","displayName":"Japan West","longitude":"135.5022","latitude":"34.6939"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/japaneast","name":"japaneast","displayName":"Japan East","longitude":"139.77","latitude":"35.68"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/brazilsouth","name":"brazilsouth","displayName":"Brazil South","longitude":"-46.633","latitude":"-23.55"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/australiaeast","name":"australiaeast","displayName":"Australia East","longitude":"151.2094","latitude":"-33.86"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/australiasoutheast","name":"australiasoutheast","displayName":"Australia Southeast","longitude":"144.9631","latitude":"-37.8136"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/southindia","name":"southindia","displayName":"South India","longitude":"80.1636","latitude":"12.9822"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/centralindia","name":"centralindia","displayName":"Central India","longitude":"73.9197","latitude":"18.5822"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/westindia","name":"westindia","displayName":"West India","longitude":"72.868","latitude":"19.088"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/canadacentral","name":"canadacentral","displayName":"Canada Central","longitude":"-79.383","latitude":"43.653"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/canadaeast","name":"canadaeast","displayName":"Canada East","longitude":"-71.217","latitude":"46.817"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/uksouth","name":"uksouth","displayName":"UK South","longitude":"-0.799","latitude":"50.941"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/ukwest","name":"ukwest","displayName":"UK West","longitude":"-3.084","latitude":"53.427"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/westcentralus","name":"westcentralus","displayName":"West Central US","longitude":"-110.234","latitude":"40.890"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/westus2","name":"westus2","displayName":"West US 2","longitude":"-119.852","latitude":"47.233"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/koreacentral","name":"koreacentral","displayName":"Korea Central","longitude":"126.9780","latitude":"37.5665"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/koreasouth","name":"koreasouth","displayName":"Korea South","longitude":"129.0756","latitude":"35.1796"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/francecentral","name":"francecentral","displayName":"France Central","longitude":"2.3730","latitude":"46.3772"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/francesouth","name":"francesouth","displayName":"France South","longitude":"2.1972","latitude":"43.8345"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/australiacentral","name":"australiacentral","displayName":"Australia Central","longitude":"149.1244","latitude":"-35.3075"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/australiacentral2","name":"australiacentral2","displayName":"Australia Central 2","longitude":"149.1244","latitude":"-35.3075"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/uaecentral","name":"uaecentral","displayName":"UAE Central","longitude":"54.366669","latitude":"24.466667"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/uaenorth","name":"uaenorth","displayName":"UAE North","longitude":"55.316666","latitude":"25.266666"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/southafricanorth","name":"southafricanorth","displayName":"South Africa North","longitude":"28.218370","latitude":"-25.731340"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/southafricawest","name":"southafricawest","displayName":"South Africa West","longitude":"18.843266","latitude":"-34.075691"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/germanynorth","name":"germanynorth","displayName":"Germany North","longitude":"8.806422","latitude":"53.073635"},{"id":"/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/locations/germanywestcentral","name":"germanywestcentral","displayName":"Germany West Central","longitude":"8.682127","latitude":"50.110924"}]}
Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x03C18780>, <function CLIQuery.handle_query_parameter at 0x03C35858>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x03DC93D8>, <function handler at 0x05352FA8>]
Getting management service client client_type=KeyVaultManagementClient
msrest.universal_http.requests : Configuring retry: max_retries=4, backoff_factor=0.8, max_backoff=90
msrest.universal_http.requests : Configuring retry: max_retries=4, backoff_factor=0.8, max_backoff=90
adal-python : 2cfa91f7-cec9-4428-88f7-00ef79d4a5df - Authority:Performing instance discovery: ...
adal-python : 2cfa91f7-cec9-4428-88f7-00ef79d4a5df - Authority:Performing static instance discovery
adal-python : 2cfa91f7-cec9-4428-88f7-00ef79d4a5df - Authority:Authority validated via static instance discovery
adal-python : 2cfa91f7-cec9-4428-88f7-00ef79d4a5df - TokenRequest:Getting a token via certificate.
adal-python : 2cfa91f7-cec9-4428-88f7-00ef79d4a5df - SelfSignedJwt:Creating self signed JWT header. x5t: rOdOGfJb6YwjcUNOx05RG5yOf40=, x5c: None
adal-python : 2cfa91f7-cec9-4428-88f7-00ef79d4a5df - SelfSignedJwt:Creating self signed JWT payload. Expires: 2019-08-29 15:58:31.219640 NotBefore: 2019-08-29 15:48:31.219640
adal-python : 2cfa91f7-cec9-4428-88f7-00ef79d4a5df - TokenRequest:No user_id passed for cache query
adal-python : 2cfa91f7-cec9-4428-88f7-00ef79d4a5df - CacheDriver:finding with query keys: {'_clientId': '...'}
adal-python : 2cfa91f7-cec9-4428-88f7-00ef79d4a5df - CacheDriver:Looking for potential cache entries: {'_clientId': '...'}
adal-python : 2cfa91f7-cec9-4428-88f7-00ef79d4a5df - CacheDriver:Found 0 potential entries.
urllib3.connectionpool : Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool : https://login.microsoftonline.com:443 "POST /microsoft.onmicrosoft.com/oauth2/token HTTP/1.1" 200 1445
adal-python : 2cfa91f7-cec9-4428-88f7-00ef79d4a5df - OAuth2Client:Get Token Server returned this correlation_id: 2cfa91f7-cec9-4428-88f7-00ef79d4a5df
msrest.universal_http : Configuring redirects: allow=True, max=30
msrest.universal_http : Configuring request: timeout=100, verify=True, cert=None
msrest.universal_http : Configuring proxies: ''
msrest.universal_http : Evaluate proxies against ENV settings: True
urllib3.connectionpool : Starting new HTTPS connection (1): graph.windows.net:443
urllib3.connectionpool : https://graph.windows.net:443 "GET /microsoft.onmicrosoft.com/me?api-version=1.6 HTTP/1.1" 404 206
msrest.exceptions : Resource not found for the segment 'me'.
msrest.async_paging : Paging async iterator protocol is not available for ServicePrincipalPaged
adal-python : bacaebee-a01c-45e4-8722-547bb7502fa4 - Authority:Performing instance discovery: ...
adal-python : bacaebee-a01c-45e4-8722-547bb7502fa4 - Authority:Performing static instance discovery
adal-python : bacaebee-a01c-45e4-8722-547bb7502fa4 - Authority:Authority validated via static instance discovery
adal-python : bacaebee-a01c-45e4-8722-547bb7502fa4 - TokenRequest:Getting a token via certificate.
adal-python : bacaebee-a01c-45e4-8722-547bb7502fa4 - SelfSignedJwt:Creating self signed JWT header. x5t: rOdOGfJb6YwjcUNOx05RG5yOf40=, x5c: None
adal-python : bacaebee-a01c-45e4-8722-547bb7502fa4 - SelfSignedJwt:Creating self signed JWT payload. Expires: 2019-08-29 15:58:31.965149 NotBefore: 2019-08-29 15:48:31.965149
adal-python : bacaebee-a01c-45e4-8722-547bb7502fa4 - TokenRequest:No user_id passed for cache query
adal-python : bacaebee-a01c-45e4-8722-547bb7502fa4 - CacheDriver:finding with query keys: {'_clientId': '...'}
adal-python : bacaebee-a01c-45e4-8722-547bb7502fa4 - CacheDriver:Looking for potential cache entries: {'_clientId': '...'}
adal-python : bacaebee-a01c-45e4-8722-547bb7502fa4 - CacheDriver:Found 0 potential entries.
urllib3.connectionpool : Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool : https://login.microsoftonline.com:443 "POST /microsoft.onmicrosoft.com/oauth2/token HTTP/1.1" 200 1445
adal-python : bacaebee-a01c-45e4-8722-547bb7502fa4 - OAuth2Client:Get Token Server returned this correlation_id: bacaebee-a01c-45e4-8722-547bb7502fa4
msrest.universal_http : Configuring redirects: allow=True, max=30
msrest.universal_http : Configuring request: timeout=100, verify=True, cert=None
msrest.universal_http : Configuring proxies: ''
msrest.universal_http : Evaluate proxies against ENV settings: True
urllib3.connectionpool : Starting new HTTPS connection (1): graph.windows.net:443
urllib3.connectionpool : https://graph.windows.net:443 "GET /microsoft.onmicrosoft.com/servicePrincipals?$filter=servicePrincipalNames%2Fany%28c%3Ac%20eq%20%27http%3A%2F%2Fmsdx-provisioning%27%29&api-version=1.6 HTTP/1.1" 200 1687
msrest.service_client : Accept header absent and forced to application/json
adal-python : a5aadefa-9e4e-4293-80f3-637495399f0e - Authority:Performing instance discovery: ...
adal-python : a5aadefa-9e4e-4293-80f3-637495399f0e - Authority:Performing static instance discovery
adal-python : a5aadefa-9e4e-4293-80f3-637495399f0e - Authority:Authority validated via static instance discovery
adal-python : a5aadefa-9e4e-4293-80f3-637495399f0e - TokenRequest:Getting a token via certificate.
adal-python : a5aadefa-9e4e-4293-80f3-637495399f0e - SelfSignedJwt:Creating self signed JWT header. x5t: rOdOGfJb6YwjcUNOx05RG5yOf40=, x5c: None
adal-python : a5aadefa-9e4e-4293-80f3-637495399f0e - SelfSignedJwt:Creating self signed JWT payload. Expires: 2019-08-29 15:58:32.678633 NotBefore: 2019-08-29 15:48:32.678633
adal-python : a5aadefa-9e4e-4293-80f3-637495399f0e - TokenRequest:No user_id passed for cache query
adal-python : a5aadefa-9e4e-4293-80f3-637495399f0e - CacheDriver:finding with query keys: {'_clientId': '...'}
adal-python : a5aadefa-9e4e-4293-80f3-637495399f0e - CacheDriver:Looking for potential cache entries: {'_clientId': '...'}
adal-python : a5aadefa-9e4e-4293-80f3-637495399f0e - CacheDriver:Found 0 potential entries.
urllib3.connectionpool : Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool : https://login.microsoftonline.com:443 "POST /microsoft.onmicrosoft.com/oauth2/token HTTP/1.1" 200 1421
adal-python : a5aadefa-9e4e-4293-80f3-637495399f0e - OAuth2Client:Get Token Server returned this correlation_id: a5aadefa-9e4e-4293-80f3-637495399f0e
msrest.http_logger : Request URL: 'https://management.azure.com/subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/resourceGroups/MicroservicePrototype/providers/Microsoft.KeyVault/vaults/RishiKV?api-version=2018-02-14'
msrest.http_logger : Request method: 'PUT'
msrest.http_logger : Request headers:
msrest.http_logger :     'Accept': 'application/json'
msrest.http_logger :     'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger :     'accept-language': 'en-US'
msrest.http_logger :     'Content-Length': '724'
msrest.http_logger :     'User-Agent': 'python/3.6.6 (Windows-10-10.0.18362-SP0) msrest/0.6.6 msrest_azure/0.6.0 azure-mgmt-keyvault/1.1.0 Azure-SDK-For-Python AZURECLI/2.0.66'
msrest.http_logger : Request body:
msrest.http_logger : {"location": "eastus", "properties": {"tenantId": "microsoft.onmicrosoft.com", "sku": {"family": "A", "name": "standard"}, "accessPolicies": [{"tenantId": "microsoft.onmicrosoft.com", "objectId": "73a064b0-a5b9-4ab0-8a98-cbed17064bb0", "permissions": {"keys": ["get", "create", "delete", "list", "update", "import", "backup", "restore", "recover"], "secrets": ["get", "list", "set", "delete", "backup", "restore", "recover"], "certificates": ["get", "list", "delete", "create", "import", "update", "managecontacts", "getissuers", "listissuers", "setissuers", "deleteissuers", "manageissuers", "recover"], "storage": ["get", "list", "delete", "set", "update", "regeneratekey", "setsas", "listsas", "getsas", "deletesas"]}}]}}
msrest.universal_http : Configuring redirects: allow=True, max=30
msrest.universal_http : Configuring request: timeout=100, verify=True, cert=None
msrest.universal_http : Configuring proxies: ''
msrest.universal_http : Evaluate proxies against ENV settings: True
urllib3.connectionpool : Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool : https://management.azure.com:443 "PUT /subscriptions/b6df90e4-85af-42b8-9444-943c17bd03f9/resourceGroups/MicroservicePrototype/providers/Microsoft.KeyVault/vaults/RishiKV?api-version=2018-02-14 HTTP/1.1" 400 82
msrest.http_logger : Response status: 400
msrest.http_logger : Response headers:
msrest.http_logger :     'Cache-Control': 'no-cache'
msrest.http_logger :     'Pragma': 'no-cache'
msrest.http_logger :     'Content-Length': '82'
msrest.http_logger :     'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger :     'Expires': '-1'
msrest.http_logger :     'x-ms-keyvault-service-version': '1.1.0.250'
msrest.http_logger :     'x-ms-request-id': '69fcab55-8f22-422e-8812-af5b16ff0073'
msrest.http_logger :     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
msrest.http_logger :     'X-Content-Type-Options': 'nosniff'
msrest.http_logger :     'Server': 'Microsoft-IIS/10.0'
msrest.http_logger :     'X-AspNet-Version': '4.0.30319'
msrest.http_logger :     'X-Powered-By': 'ASP.NET'
msrest.http_logger :     'x-ms-ratelimit-remaining-subscription-writes': '1199'
msrest.http_logger :     'x-ms-correlation-request-id': '00ea71f7-0403-45b6-ae58-0cab5ea978a5'
msrest.http_logger :     'x-ms-routing-request-id': 'WESTUS:20190829T224835Z:00ea71f7-0403-45b6-ae58-0cab5ea978a5'
msrest.http_logger :     'Date': 'Thu, 29 Aug 2019 22:48:35 GMT'
msrest.http_logger : Response content:
msrest.http_logger : {"error":{"code":"BadRequest","message":"Bad JSON content found in the request."}}
msrest.exceptions : Bad JSON content found in the request.
cli.azure.cli.core.util : Bad JSON content found in the request.
Bad JSON content found in the request.
az_command_data_logger : exit code: 1
telemetry.save : Save telemetry record of length 2476 in cache
telemetry.check : Negative: The C:\Users\rajsin\.azure\telemetry.txt was modified at 2019-08-29 15:42:04.556722, which in less than 600.000000 s
command ran in 7.663 seconds.
jiasli commented 5 years ago

It looks like the issue is caused by

"tenantId": "microsoft.onmicrosoft.com",

Please try to log in with the microsoft tenant ID 72f988bf-86f1-41af-91ab-2d7cd011db47 directly and see if that works.

We will discuss internally whether to fix this on CLI or Key Vault service.

thrustCoder commented 5 years ago

It looks like the issue is caused by "tenantId": "microsoft.onmicrosoft.com",

Please try to log in with the microsoft tenant ID 72f988bf-86f1-41af-91ab-2d7cd011db47 directly and see if that works. We will discuss internally whether to fix this on CLI or Key Vault service.

Thanks @jiasli. I was able to unblock myself by specifying the tenant id during 'az login' step

az login --service-principal -u <your-username> -p <your-password> --tenant "72f988bf-86f1-41af-91ab-2d7cd011db47"
yasikmondal commented 5 years ago

Hello @tjprescott , I am getting the same error, during an ARM deployment.

I am using the following template:

{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "keyVaultName": {
      "type": "string",
      "metadata": {
        "description": "Specifies the name of the key vault."
      }
    },
    "location": {
      "type": "string",
      "metadata": {
        "description": "Specifies the Azure location where the key vault should be created."
      }
    },
    "secretName": {
      "type": "string",
      "metadata": {
        "description": "Specifies the name of the secret that you want to create."
      }
    },
    "secretValue": {
      "type": "securestring",
      "metadata": {
        "description": "Specifies the value of the secret that you want to create."
      }
    }
  },
  "variables": {
    "skuName": "Standard",
    "enabledForVMDeployment": false,
    "enabledForDiskEncryption": false,
    "enabledForTemplateDeployment": false,
    "tenantId": "xxx",
    "objectId": "xxx",
    "keysPermissions": "all",
    "secretsPermissions": "all",
  },
  "resources": [
    {
      "type": "Microsoft.KeyVault/vaults",
      "name": "[parameters('keyVaultName')]",
      "apiVersion": "2018-02-14",
      "location": "[parameters('location')]",
      "properties": {
        "enabledForVMDeployment": "[variables('enabledForVMDeployment')]",
        "enabledForDiskEncryption": "[variables('enabledForDiskEncryption')]",
        "enabledForTemplateDeployment": "[variables('enabledForTemplateDeployment')]",
        "tenantId": "[variables('tenantId')]",
        "accessPolicies": [
          {
            "objectId": "[variables('objectId')]",
            "tenantId": "[variables('tenantId')]",
            "permissions": {
              "keys": "[variables('keysPermissions')]",
              "secrets": "[variables('secretsPermissions')]"
            }
          }
        ],
        "sku": {
          "name": "[variables('skuName')]",
          "family": "A"
        },
        "networkAcls": {
          "value": {
            "defaultAction": "Allow",
            "bypass": "AzureServices"
          }
        }
      }
    },
    {
      "type": "Microsoft.KeyVault/vaults/secrets",
      "name": "[concat(parameters('keyVaultName'), '/', parameters('secretName'))]",
      "apiVersion": "2018-02-14",
      "location": "[parameters('location')]",
      "dependsOn": [
        "[resourceId('Microsoft.KeyVault/vaults', parameters('keyVaultName'))]"
      ],
      "properties": {
        "value": "[parameters('secretValue')]"
      }
    }
  ]
}

In Varibale field we have added some extra ","

"variables": { "skuName": "Standard", "enabledForVMDeployment": false, "enabledForDiskEncryption": false, "enabledForTemplateDeployment": false, "tenantId": "xxx", "objectId": "xxx", "keysPermissions": "all", "secretsPermissions": "all", },