Comments (5)
This error looks like it is not able to find the verifiation certificate from the path provided. Can you try verify if the --path provided is valid maybe (.\ instead of ./ ) or try to provide a full path.
If you encountered futher errors, you can also try to verify the cert from the UI and see if works for comparison: https://docs.microsoft.com/en-us/azure/iot-dps/how-to-verify-certificates
from azure-iot-cli-extension.
Thanks for the reply. The verification via the Portal with the same certificate works successfully. However, I am trying to upload the verification cert programmatically using the azure cli.
If I enter an invalid path or filename, I get a different error "Errno 2] No such file or directory:". I've found that the "Operation returned an invalid status code 'Not Found'" is usually associated with an invalid eTag.
One thing I've noticed is that the create and generate-verification-code commands result in different eTags. Here is the process below.
- Issue az iot dps certificate create command and receive eTag.
- Issue az iot dps certificate generate-verification-code command with eTag from Step #1.
- This generates the Verification Code and an updated eTag.
- Issue az iot dps certificate verify with a.) Verification Cert signed up uploaded cert and b.) updated etag from Step #3.
from azure-iot-cli-extension.
Hi @mikermesh, the work flow that you've provided here is correct, though I also tried it myself, and find it working for me:
- az iot dps certificate create --dps-name yingtest -g yingtest --name testcert -p ./testcert.cer
where i got etag AAAAAAAyIyo= - az iot dps certificate generate-verification-code --dps-name yingtest -g yingtest --name testcert --etag AAAAAAAyIyo=
where i got etag AAAAAAAyIzo= - az iot dps certificate verify --dps-name yingtest -g yingtest --name testcert -p ./verify.cer --etag AAAAAAAyIzo=
Not sure if you are doing anything different here?
For your reference, I have written some tests related to these command before, where you may find it helpful: https://github.com/Azure/azure-cli/blob/dev/src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/tests/latest/test_iot_dps_commands.py (starting from line 87). There are several helper functions in the same folder, regarding to create testcert.cer and verify.cert
from azure-iot-cli-extension.
I guess the problem might be az iot dps certificate verify --dps-name "$dpsName" --resource-group "$resourceGroup" --name VerifyCert --path ./Verification.cer --etag AAAAAAAAAAA= where --name should be the name of the same name in the first step. I could be wrong, as I am purely guessing judging the name of the cert you provided here :)
from azure-iot-cli-extension.
@YingXue You are 100% right...my command wasn't passing in the same cert name as step#1. I updated my script and it is working now. I'm closing the issue. Thanks for your help!
from azure-iot-cli-extension.
Related Issues (20)
- event hub monitor issue HOT 6
- Cannot Add Azure IoT Extension HOT 4
- Unable to run az extension for azure-iot in centos 7 HOT 1
- az iot hub monitor command fials HOT 3
- MAC os Compile?
- az iot du update stage fail HOT 2
- az iot hub monitor --login fails HOT 11
- [bug] Test
- [bug] IotCentral integration test failing trying execute app show -n {} command when test configuration has app id HOT 4
- How to create new iot hub with new TLS certificate root? HOT 3
- Latest version does not work with the minimum requirements of the Azure CLI version HOT 2
- [bug] az iot central diagnostics stops tracking events after a while HOT 4
- az iot hub device-identity create issues HOT 3
- [bug] az iot device send-d2c-message doesn't allow for different data formats, only utf-8 HOT 2
- [bug] CLI fails when trying to delete a message-endpoint HOT 3
- [bug] list device-twins error: 'list' is misspelled HOT 2
- [bug] az iot hub monitor-events -n {iothub_name} is not working HOT 11
- [bug] az iot hub state export fails with unexpected error, traceback: 'resourceGroup' HOT 3
- [Technical Question] Create Azure IoT Hub with turned-on preview mode HOT 2
- IoT Hub Device Twin Replace does not allow `null` values HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-iot-cli-extension.