Skip to content

Instantly share code, notes, and snippets.

@j1n6
Created April 4, 2017 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j1n6/ccf06ecfe2bb46316ffbcd82aafe471b to your computer and use it in GitHub Desktop.
Save j1n6/ccf06ecfe2bb46316ffbcd82aafe471b to your computer and use it in GitHub Desktop.
Azure error output for role creation
Command arguments ['role', 'definition', 'update', '--role-definition', '{REMOVE SENSITIVE DATA}', '--name', 'xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', '--scope', '/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx']
Current active cloud 'AzureCloud'
{'active_directory': 'https://login.microsoftonline.com',
'active_directory_graph_resource_id': 'https://graph.windows.net/',
'active_directory_resource_id': 'https://management.core.windows.net/',
'batch_resource_id': 'https://batch.core.windows.net/',
'gallery': 'https://gallery.azure.com/',
'management': 'https://management.core.windows.net/',
'resource_manager': 'https://management.azure.com/',
'sql_management': 'https://management.core.windows.net:8443/'}
{'azure_datalake_analytics_catalog_and_job_endpoint': 'azuredatalakeanalytics.net',
'azure_datalake_store_file_system_endpoint': 'azuredatalakestore.net',
'keyvault_dns': '.vault.azure.net',
'sql_server_hostname': '.database.windows.net',
'storage_endpoint': 'core.windows.net'}
Registered application event handler 'CommandTableParams.Loaded' at <function add_id_parameters at 0x7ffebc2f59b0>
Registered application event handler 'CommandTable.Loaded' at <function add_id_parameters at 0x7ffebc2f59b0>
Successfully loaded command table from module 'role'.
Application event 'CommandTable.Loaded' with event data {'command_table': OrderedDict([('ad group show', <azure.cli.core.commands.CliCommand object at 0x7ffebc2718d0>),
('ad sp reset-credentials', <azure.cli.core.commands.CliCommand object at 0x7ffebc271810>), ('ad sp delete', <azure.cli.core.commands.CliCommand object at 0x7ffebc2716
10>), ('ad user delete', <azure.cli.core.commands.CliCommand object at 0x7ffebc271850>), ('role definition delete', <azure.cli.core.commands.CliCommand object at 0x7ffe
bc264ed0>), ('ad group list', <azure.cli.core. [...]
Application event 'CommandParser.Loaded' with event data {'parser': AzCliCommandParser(prog='az', usage=None, description=None, version=None, formatter_class=<class 'ar
gparse.HelpFormatter'>, conflict_handler='error', add_help=True)}
Application event 'CommandTableParams.Loaded' with event data {'command_table': OrderedDict([('ad group show', <azure.cli.core.commands.CliCommand object at 0x7ffebc271
8d0>), ('ad sp reset-credentials', <azure.cli.core.commands.CliCommand object at 0x7ffebc271810>), ('ad sp delete', <azure.cli.core.commands.CliCommand object at 0x7ffe
bc271610>), ('ad user delete', <azure.cli.core.commands.CliCommand object at 0x7ffebc271850>), ('role definition delete', <azure.cli.core.commands.CliCommand object at
0x7ffebc264ed0>), ('ad group list', <azure.cli.core. [...]
Application event 'CommandParser.Parsed' with event data {'args': Namespace(_command_package='role', _jmespath_query=None, _log_verbosity_debug=False, _log_verbosity_ve
rbose=False, _output_format='json', _parser=AzCliCommandParser(prog='az role definition update', usage=None, description=None, version=None, formatter_class=<class 'arg
parse.HelpFormatter'>, conflict_handler='error', add_help=True), _validators=[], command='role definition update', func=<function handler at 0x7ffebc26eb90>, properties
_to_add=[], properties_to_remove=[], properties [...]
Getting management service client client_type=AuthorizationManagementClient
msrest.pipeline : Adding 'log_request' callback before event: 'request'
msrest.pipeline : Callback to overwrite original call: False
msrest.pipeline : Adding 'log_response' callback after event: 'response'
msrest.pipeline : Callback to overwrite original call: False
adal-python : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - Authority:Performing instance discovery: https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
adal-python : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - Authority:Performing static instance discovery
adal-python : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - Authority:Authority validated via static instance discovery
adal-python : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - TokenRequest:Getting token with client credentials.
adal-python : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - TokenRequest:No user_id passed for cache query
adal-python : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:finding with query: {"_clientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}
adal-python : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:Looking for potential cache entries:
adal-python : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:{"_clientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}
adal-python : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:Found 0 potential entries.
requests.packages.urllib3.connectionpool : Starting new HTTPS connection (1): login.microsoftonline.com
requests.packages.urllib3.connectionpool : https://login.microsoftonline.com:443 "POST /xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/token HTTP/1.1" 200 1335
adal-python : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:Get Token Server returned this correlation_id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
adal-python : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:Adding entry AccessTokenId: SENSITIVE DATA
adal-python : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - OAuth2Client:Added entry is MRRT
msrest.pipeline : Configuring request: timeout=100, verify=True, cert=None
msrest.pipeline : Configuring redirects: allow=True, max=30
msrest.pipeline : Configuring proxies: ''
msrest.pipeline : Evaluate proxies against ENV settings: True
msrest.pipeline : Configuring retry: max_retries=3, backoff_factor=0.8, max_backoff=90
msrest.http_logger : Request URL: 'https://management.azure.com/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Authorization/roleDefinitions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?api-version=2015-07-01'
msrest.http_logger : Request method: 'GET'
msrest.http_logger : Request headers:
msrest.http_logger : 'Connection': 'keep-alive'
msrest.http_logger : 'Accept-Encoding': 'gzip, deflate'
msrest.http_logger : 'Accept': 'application/json'
msrest.http_logger : 'User-Agent': 'python/2.7.6 (Linux-3.4.0+-x86_64-with-Ubuntu-14.04-trusty) requests/2.13.0 msrest/0.4.6 msrest_azure/0.4.7 authorizationmanagem
entclient/0.30.0rc6 Azure-SDK-For-Python AZURECLI/2.0.2'
msrest.http_logger : 'Authorization': 'Bearer SENSITIVE DATA'
msrest.http_logger : 'x-ms-client-request-id': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
msrest.http_logger : 'CommandName': 'role definition update'
msrest.http_logger : 'Content-Type': 'application/json; charset=utf-8'
msrest.http_logger : 'accept-language': 'en-US'
msrest.http_logger : Request body:
msrest.http_logger : None
requests.packages.urllib3.connectionpool : Starting new HTTPS connection (1): management.azure.com
requests.packages.urllib3.connectionpool : https://management.azure.com:443 "GET /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Authorization/r
oleDefinitions/e487ce99-a95d-4b7e-a697-619d4246fc4f?api-version=2015-07-01 HTTP/1.1" 200 None
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 : 'Transfer-Encoding': 'chunked'
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-request-id': 'xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
msrest.http_logger : 'X-Content-Type-Options': 'nosniff'
msrest.http_logger : 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
msrest.http_logger : 'Set-Cookie': 'x-ms-gateway-slice=productionb; path=/'
msrest.http_logger : 'Server': 'Microsoft-IIS/8.5'
msrest.http_logger : 'X-Powered-By': 'ASP.NET'
msrest.http_logger : 'x-ms-ratelimit-remaining-subscription-reads': '14880'
msrest.http_logger : 'x-ms-correlation-request-id': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
msrest.http_logger : 'x-ms-routing-request-id': 'UKWEST:20170404T113645Z:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
msrest.http_logger : 'Date': 'Tue, 04 Apr 2017 11:36:45 GMT'
msrest.http_logger : Response content:
msrest.http_logger : Body contains chunked data.
string indices must be integers, not str
Traceback (most recent call last):
File "/home/jing/lib/azure-cli/local/lib/python2.7/site-packages/azure/cli/main.py", line 37, in main
cmd_result = APPLICATION.execute(args)
File "/home/jing/lib/azure-cli/local/lib/python2.7/site-packages/azure/cli/core/application.py", line 157, in execute
result = expanded_arg.func(params)
File "/home/jing/lib/azure-cli/local/lib/python2.7/site-packages/azure/cli/core/commands/arm.py", line 309, in handler
opres = setter(client, **setterargs) if client else setter(**setterargs)
File "/home/jing/lib/azure-cli/local/lib/python2.7/site-packages/azure/mgmt/authorization/operations/role_definitions_operations.py", line 200, in create_or_update
body_content = self._serialize.body(role_definition, 'RoleDefinition')
File "/home/jing/lib/azure-cli/local/lib/python2.7/site-packages/msrest/serialization.py", line 297, in body
data = _convert_to_datatype(data, data_type, self.dependencies)
File "/home/jing/lib/azure-cli/local/lib/python2.7/site-packages/msrest/serialization.py", line 171, in _convert_to_datatype
localtypes) for key in data
File "/home/jing/lib/azure-cli/local/lib/python2.7/site-packages/msrest/serialization.py", line 171, in <dictcomp>
localtypes) for key in data
TypeError: string indices must be integers, not str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment