Skip to content

Commit e25e550

Browse files
committed
Update prereqs to reflect az login
1 parent 21b17e0 commit e25e550

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

articles/defender-for-iot/device-builders/quickstart-upload-firmware-using-python.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,7 @@ This quickstart assumes a basic understanding of Defender for IoT Firmware Analy
2929
pip install azure-mgmt-iotfirmwaredefense
3030
pip install azure-identity
3131
```
32-
* Visit [Authorize your application](/azure/azure-web-pubsub/howto-authorize-from-application) to create an application.
33-
* Once you've created your application, save your Azure client ID and Azure tenant ID from the **Overview** page:
34-
:::image type="content" source="media/quickstart-upload-firmware-using-python/overview-client-id-tenant-id.png" alt-text="Screenshot that shows the Overview page of the application." lightbox="media/quickstart-upload-firmware-using-python/overview-client-id-tenant-id.png":::
35-
* Save your Azure client secret from the **Certificates & secrets** page. Be sure to copy the value right away because the Azure client secret will only be shown once.
36-
:::image type="content" source="media/quickstart-upload-firmware-using-python/certs-secrets.png" alt-text="Screenshot that shows the Certificates & secrets page of the application." lightbox="media/quickstart-upload-firmware-using-python/certs-secrets.png":::
37-
* Configure the following environment variables with the three values that you've saved:
38-
* `AZURE_CLIENT_ID` for Azure client ID
39-
* `AZURE_TENANT_ID` for Azure tenant ID
40-
* `AZURE_CLIENT_SECRET` for Azure client secret
41-
42-
In addition, the Azure subscription ID can be configured with the environment variable `AZURE_SUBSCRIPTION_ID`.
43-
44-
Once you've configured your environment variables, the client can be authenticated by the following code:
45-
46-
```python
47-
from azure.identity import DefaultAzureCredential
48-
from azure.mgmt.iotfirmwaredefense import IoTFirmwareDefenseMgmtClient
49-
import os
50-
51-
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
52-
client = IoTFirmwareDefenseMgmtClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
53-
```
32+
* Log in to your Azure account by running the command [`az login`](/cli/azure/reference-index?#az-login).
5433

5534
## Run the following Python script
5635

0 commit comments

Comments
 (0)