Describe the bug
When I try to do az sf cluster create in Cloud Shell, it fails at the Create a KeyVault stage with the following error:
Found primary certificate parameters in parameters file
Creating key vault
'ObjectsOperations' object has no attribute 'get_current_user'
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 197, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 373, in execute
six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 347, in execute
result = cmd(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 182, in call
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/init.py", line 440, in default_command_handler
result = op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/servicefabric/custom.py", line 238, in new_cluster
parameter_file)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/servicefabric/custom.py", line 1822, in _set_parameters_for_customize_template
secret_identifier)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/servicefabric/custom.py", line 1140, in _create_certificate
cmd, cli_ctx, vault_resource_group_name, vault_name, location, enabled_for_deployment=True).result()
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/servicefabric/custom.py", line 1664, in _create_keyvault
object_id = _get_current_user_object_id(graph_client)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/servicefabric/custom.py", line 1695, in _get_current_user_object_id
current_user = graph_client.objects.get_current_user()
AttributeError: 'ObjectsOperations' object has no attribute 'get_current_user'
To Reproduce
- Open Bash instance for Cloud Shell and run the following command:
az sf cluster create --resource-group demolinuxsecure --location westus --certificate-output-folder . --certificate-password --certificate-subject-name demolinuxsecure0808.westus.cloudapp.azure.com --vault-name demolinuxsecure0808 --vault-resource-group demolinuxsecure --template-file AzureDeploy.json --parameter-file AzureDeploy.Parameters.json
using the template here: https://github.com/suhuruli/service-fabric-cluster-templates/tree/master/10-VM-Ubuntu-2-NodeType-Secure
Expected behavior
I expect the deployment to work since the exact same steps work on my local Mac machine.
Environment summary
Cloud Shell.
Describe the bug
When I try to do az sf cluster create in Cloud Shell, it fails at the Create a KeyVault stage with the following error:
Found primary certificate parameters in parameters file
Creating key vault
'ObjectsOperations' object has no attribute 'get_current_user'
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 197, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 373, in execute
six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 347, in execute
result = cmd(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 182, in call
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/init.py", line 440, in default_command_handler
result = op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/servicefabric/custom.py", line 238, in new_cluster
parameter_file)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/servicefabric/custom.py", line 1822, in _set_parameters_for_customize_template
secret_identifier)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/servicefabric/custom.py", line 1140, in _create_certificate
cmd, cli_ctx, vault_resource_group_name, vault_name, location, enabled_for_deployment=True).result()
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/servicefabric/custom.py", line 1664, in _create_keyvault
object_id = _get_current_user_object_id(graph_client)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/servicefabric/custom.py", line 1695, in _get_current_user_object_id
current_user = graph_client.objects.get_current_user()
AttributeError: 'ObjectsOperations' object has no attribute 'get_current_user'
To Reproduce
az sf cluster create --resource-group demolinuxsecure --location westus --certificate-output-folder . --certificate-password --certificate-subject-name demolinuxsecure0808.westus.cloudapp.azure.com --vault-name demolinuxsecure0808 --vault-resource-group demolinuxsecure --template-file AzureDeploy.json --parameter-file AzureDeploy.Parameters.json
using the template here: https://github.com/suhuruli/service-fabric-cluster-templates/tree/master/10-VM-Ubuntu-2-NodeType-Secure
Expected behavior
I expect the deployment to work since the exact same steps work on my local Mac machine.
Environment summary
Cloud Shell.