Azure / azure-cli

Azure Command-Line Interface
MIT License
4.04k stars 3.01k forks source link

az iot hub device-identity import -n {iothub_name} --ibcu {input_sas_uri} --obcu {output_sas_uri} is invaild #27411

Closed zh0903 closed 6 months ago

zh0903 commented 1 year ago

Describe the bug

Customer reported : "az iot hub device-identity import -n {iothub_name} --ibcu {input_sas_uri} --obcu {output_sas_uri}" is invalid now. I can reproduce his error with all fine configuration and resource. But az iot hub device-identity import -n {iothub_name} --ibc {input_blob_container_name} --isa {input_storage_account_name} --obc {output_blob_container_name} --osa {output_storage_account_name} works well.

Related command

Customer reported : "az iot hub device-identity import -n {iothub_name} --ibcu {input_sas_uri} --obcu {output_sas_uri}" is invalid now. I can reproduce his error with all fine configuration and resource. But az iot hub device-identity import -n {iothub_name} --ibc {input_blob_container_name} --isa {input_storage_account_name} --obc {output_blob_container_name} --osa {output_storage_account_name} works well.

Errors

Customer reported : "az iot hub device-identity import -n {iothub_name} --ibcu {input_sas_uri} --obcu {output_sas_uri}" is invalid now. I can reproduce his error with all fine configuration and resource. But az iot hub device-identity import -n {iothub_name} --ibc {input_blob_container_name} --isa {input_storage_account_name} --obc {output_blob_container_name} --osa {output_storage_account_name} works well.

Issue script & Debug output

Customer reported : "az iot hub device-identity import -n {iothub_name} --ibcu {input_sas_uri} --obcu {output_sas_uri}" is invalid now. I can reproduce his error with all fine configuration and resource. But az iot hub device-identity import -n {iothub_name} --ibc {input_blob_container_name} --isa {input_storage_account_name} --obc {output_blob_container_name} --osa {output_storage_account_name} works well.

Expected behavior

Customer reported : "az iot hub device-identity import -n {iothub_name} --ibcu {input_sas_uri} --obcu {output_sas_uri}" is invalid now. I can reproduce his error with all fine configuration and resource. But az iot hub device-identity import -n {iothub_name} --ibc {input_blob_container_name} --isa {input_storage_account_name} --obc {output_blob_container_name} --osa {output_storage_account_name} works well.

Environment Summary

Customer reported : "az iot hub device-identity import -n {iothub_name} --ibcu {input_sas_uri} --obcu {output_sas_uri}" is invalid now. I can reproduce his error with all fine configuration and resource. But az iot hub device-identity import -n {iothub_name} --ibc {input_blob_container_name} --isa {input_storage_account_name} --obc {output_blob_container_name} --osa {output_storage_account_name} works well.

Additional context

No response

yonzhan commented 1 year ago

Thank you for opening this issue, we will look into it.

microsoft-github-policy-service[bot] commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-iot-cli-triage.

vilit1 commented 1 year ago

Hi

For the az iot hub device-identity import -n {iothub_name} --ibcu {input_sas_uri} --obcu {output_sas_uri} - do you include the SAS token key as part of the URI's? This is noted in the help: image

If you use the alternate az iot hub device-identity import -n {iothub_name} --ibc {input_blob_container_name} --isa {input_storage_account_name} --obc {output_blob_container_name} --osa {output_storage_account_name}, the cli will retrieve the necessary SAS token for you.

If you add the SAS token to the ibcu/obcu version and still have issues, please post the error message so I can debug your issue.

microsoft-github-policy-service[bot] commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-iot-cli-triage.

microsoft-github-policy-service[bot] commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @rkmanda, @chieftn.

zh0903 commented 1 year ago

Hi

For the az iot hub device-identity import -n {iothub_name} --ibcu {input_sas_uri} --obcu {output_sas_uri} - do you include the SAS token key as part of the URI's? This is noted in the help: image

If you use the alternate az iot hub device-identity import -n {iothub_name} --ibc {input_blob_container_name} --isa {input_storage_account_name} --obc {output_blob_container_name} --osa {output_storage_account_name}, the cli will retrieve the necessary SAS token for you.

If you add the SAS token to the ibcu/obcu version and still have issues, please post the error message so I can debug your issue.

Yes, we included them. You may test if "az iot hub device-identity import -n {iothub_name} --ibcu {input_sas_uri} --obcu {output_sas_uri}" works

vilit1 commented 6 months ago

Can you post the error message? I cannot debug without it.