Skip to content

Commit 115b70f

Browse files
committedJan 22, 2022
Updated README.md
1 parent d3b7c93 commit 115b70f

File tree

12 files changed

+207
-273
lines changed

12 files changed

+207
-273
lines changed
 

‎azureblobstoragecopy/README.md

+17-23
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Copy a Blob from a Blob Storage container to another Blob Storage container in a
88

99
* You must have a [Microsoft Azure](https://azure.microsoft.com/) subscription.
1010

11-
* You must have an Azure storage account.
11+
* You must have the following installed:
12+
* Python 3
13+
* Azure CLI
1214

1315
* The code was written for:
1416
* Python 3
@@ -24,37 +26,29 @@ Copy a Blob from a Blob Storage container to another Blob Storage container in a
2426

2527
## Using the code
2628

27-
* Configure your Azure access.
28-
29-
You must create an Azure AD service principal in order to enable application to connect resources into Azure. The service principal grants your application to manage resources in your Azure subscription.
29+
* Sign in Azure (Interactively).
3030

31-
The Azure SDKs Libraries for Java allow you to use several authentication schemes.
31+
The Azure CLI's default authentication method for logins uses a web browser and access token to sign in.
3232

33-
The application uses an authentication file for authenticating.
33+
1. Run the Azure CLI login command.
3434

35-
The credentials are taken from `AZURE_AUTH_LOCATION` environment variable.
35+
```bash
36+
az login
37+
```
3638

37-
You can create a service principal and generate this file using Azure CLI 2.0 or using the Azure cloud shell.
39+
If the CLI can open your default browser, it will do so and load an Azure sign-in page.
3840

39-
* Make sure you select your subscription by:
41+
Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
4042

41-
```bash
42-
az account set --subscription <name or id>
43-
```
43+
If no web browser is available or the web browser fails to open, use device code flow with az login --use-device-code.
4444

45-
and you have the privileges to create service principals.
45+
2. Sign in with your account credentials in the browser.
4646

47-
* Execute the following command for creating the service principal and the authentication file:
48-
49-
```bash
50-
az ad sp create-for-rbac --sdk-auth > my.azureauth
51-
```
52-
53-
* Set the `AZURE_AUTH_LOCATION` environment variable in your Operating System with the path of your authentication file.
47+
Make sure you select your subscription by:
5448

55-
```bash
56-
AZURE_AUTH_LOCATION = /path/to/my.azureauth
57-
```
49+
```bash
50+
az account set --subscription <name or id>
51+
```
5852

5953
* Create a storage account.
6054

‎azureblobstoragecreate/README.md

+17-23
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Create a new Blob Storage container in an Azure storage account.
88

99
* You must have a [Microsoft Azure](https://azure.microsoft.com/) subscription.
1010

11-
* You must have an Azure storage account.
11+
* You must have the following installed:
12+
* Python 3
13+
* Azure CLI
1214

1315
* The code was written for:
1416
* Python 3
@@ -24,37 +26,29 @@ Create a new Blob Storage container in an Azure storage account.
2426

2527
## Using the code
2628

27-
* Configure your Azure access.
28-
29-
You must create an Azure AD service principal in order to enable application to connect resources into Azure. The service principal grants your application to manage resources in your Azure subscription.
29+
* Sign in Azure (Interactively).
3030

31-
The Azure SDKs Libraries for Java allow you to use several authentication schemes.
31+
The Azure CLI's default authentication method for logins uses a web browser and access token to sign in.
3232

33-
The application uses an authentication file for authenticating.
33+
1. Run the Azure CLI login command.
3434

35-
The credentials are taken from `AZURE_AUTH_LOCATION` environment variable.
35+
```bash
36+
az login
37+
```
3638

37-
You can create a service principal and generate this file using Azure CLI 2.0 or using the Azure cloud shell.
39+
If the CLI can open your default browser, it will do so and load an Azure sign-in page.
3840

39-
* Make sure you select your subscription by:
41+
Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
4042

41-
```bash
42-
az account set --subscription <name or id>
43-
```
43+
If no web browser is available or the web browser fails to open, use device code flow with az login --use-device-code.
4444

45-
and you have the privileges to create service principals.
45+
2. Sign in with your account credentials in the browser.
4646

47-
* Execute the following command for creating the service principal and the authentication file:
48-
49-
```bash
50-
az ad sp create-for-rbac --sdk-auth > my.azureauth
51-
```
52-
53-
* Set the `AZURE_AUTH_LOCATION` environment variable in your Operating System with the path of your authentication file.
47+
Make sure you select your subscription by:
5448

55-
```bash
56-
AZURE_AUTH_LOCATION = /path/to/my.azureauth
57-
```
49+
```bash
50+
az account set --subscription <name or id>
51+
```
5852

5953
* Create a storage account.
6054

‎azureblobstoragedelete/README.md

+17-23
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Delete a Blob Storage container in an Azure storage account.
88

99
* You must have a [Microsoft Azure](https://azure.microsoft.com/) subscription.
1010

11-
* You must have an Azure storage account.
11+
* You must have the following installed:
12+
* Python 3
13+
* Azure CLI
1214

1315
* The code was written for:
1416
* Python 3
@@ -24,37 +26,29 @@ Delete a Blob Storage container in an Azure storage account.
2426

2527
## Using the code
2628

27-
* Configure your Azure access.
28-
29-
You must create an Azure AD service principal in order to enable application to connect resources into Azure. The service principal grants your application to manage resources in your Azure subscription.
29+
* Sign in Azure (Interactively).
3030

31-
The Azure SDKs Libraries for Java allow you to use several authentication schemes.
31+
The Azure CLI's default authentication method for logins uses a web browser and access token to sign in.
3232

33-
The application uses an authentication file for authenticating.
33+
1. Run the Azure CLI login command.
3434

35-
The credentials are taken from `AZURE_AUTH_LOCATION` environment variable.
35+
```bash
36+
az login
37+
```
3638

37-
You can create a service principal and generate this file using Azure CLI 2.0 or using the Azure cloud shell.
39+
If the CLI can open your default browser, it will do so and load an Azure sign-in page.
3840

39-
* Make sure you select your subscription by:
41+
Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
4042

41-
```bash
42-
az account set --subscription <name or id>
43-
```
43+
If no web browser is available or the web browser fails to open, use device code flow with az login --use-device-code.
4444

45-
and you have the privileges to create service principals.
45+
2. Sign in with your account credentials in the browser.
4646

47-
* Execute the following command for creating the service principal and the authentication file:
48-
49-
```bash
50-
az ad sp create-for-rbac --sdk-auth > my.azureauth
51-
```
52-
53-
* Set the `AZURE_AUTH_LOCATION` environment variable in your Operating System with the path of your authentication file.
47+
Make sure you select your subscription by:
5448

55-
```bash
56-
AZURE_AUTH_LOCATION = /path/to/my.azureauth
57-
```
49+
```bash
50+
az account set --subscription <name or id>
51+
```
5852

5953
* Create a storage account.
6054

‎azureblobstoragedeleteobject/README.md

+17-23
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Delete a Blob in a Blob Storage container in an Azure storage account.
88

99
* You must have a [Microsoft Azure](https://azure.microsoft.com/) subscription.
1010

11-
* You must have an Azure storage account.
11+
* You must have the following installed:
12+
* Python 3
13+
* Azure CLI
1214

1315
* The code was written for:
1416
* Python 3
@@ -24,37 +26,29 @@ Delete a Blob in a Blob Storage container in an Azure storage account.
2426

2527
## Using the code
2628

27-
* Configure your Azure access.
28-
29-
You must create an Azure AD service principal in order to enable application to connect resources into Azure. The service principal grants your application to manage resources in your Azure subscription.
29+
* Sign in Azure (Interactively).
3030

31-
The Azure SDKs Libraries for Java allow you to use several authentication schemes.
31+
The Azure CLI's default authentication method for logins uses a web browser and access token to sign in.
3232

33-
The application uses an authentication file for authenticating.
33+
1. Run the Azure CLI login command.
3434

35-
The credentials are taken from `AZURE_AUTH_LOCATION` environment variable.
35+
```bash
36+
az login
37+
```
3638

37-
You can create a service principal and generate this file using Azure CLI 2.0 or using the Azure cloud shell.
39+
If the CLI can open your default browser, it will do so and load an Azure sign-in page.
3840

39-
* Make sure you select your subscription by:
41+
Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
4042

41-
```bash
42-
az account set --subscription <name or id>
43-
```
43+
If no web browser is available or the web browser fails to open, use device code flow with az login --use-device-code.
4444

45-
and you have the privileges to create service principals.
45+
2. Sign in with your account credentials in the browser.
4646

47-
* Execute the following command for creating the service principal and the authentication file:
48-
49-
```bash
50-
az ad sp create-for-rbac --sdk-auth > my.azureauth
51-
```
52-
53-
* Set the `AZURE_AUTH_LOCATION` environment variable in your Operating System with the path of your authentication file.
47+
Make sure you select your subscription by:
5448

55-
```bash
56-
AZURE_AUTH_LOCATION = /path/to/my.azureauth
57-
```
49+
```bash
50+
az account set --subscription <name or id>
51+
```
5852

5953
* Create a storage account.
6054

‎azureblobstoragedownload/README.md

+17-23
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Download a file from a Blob Storage container in an Azure storage account.
88

99
* You must have a [Microsoft Azure](https://azure.microsoft.com/) subscription.
1010

11-
* You must have an Azure storage account.
11+
* You must have the following installed:
12+
* Python 3
13+
* Azure CLI
1214

1315
* The code was written for:
1416
* Python 3
@@ -24,37 +26,29 @@ Download a file from a Blob Storage container in an Azure storage account.
2426

2527
## Using the code
2628

27-
* Configure your Azure access.
28-
29-
You must create an Azure AD service principal in order to enable application to connect resources into Azure. The service principal grants your application to manage resources in your Azure subscription.
29+
* Sign in Azure (Interactively).
3030

31-
The Azure SDKs Libraries for Java allow you to use several authentication schemes.
31+
The Azure CLI's default authentication method for logins uses a web browser and access token to sign in.
3232

33-
The application uses an authentication file for authenticating.
33+
1. Run the Azure CLI login command.
3434

35-
The credentials are taken from `AZURE_AUTH_LOCATION` environment variable.
35+
```bash
36+
az login
37+
```
3638

37-
You can create a service principal and generate this file using Azure CLI 2.0 or using the Azure cloud shell.
39+
If the CLI can open your default browser, it will do so and load an Azure sign-in page.
3840

39-
* Make sure you select your subscription by:
41+
Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
4042

41-
```bash
42-
az account set --subscription <name or id>
43-
```
43+
If no web browser is available or the web browser fails to open, use device code flow with az login --use-device-code.
4444

45-
and you have the privileges to create service principals.
45+
2. Sign in with your account credentials in the browser.
4646

47-
* Execute the following command for creating the service principal and the authentication file:
48-
49-
```bash
50-
az ad sp create-for-rbac --sdk-auth > my.azureauth
51-
```
52-
53-
* Set the `AZURE_AUTH_LOCATION` environment variable in your Operating System with the path of your authentication file.
47+
Make sure you select your subscription by:
5448

55-
```bash
56-
AZURE_AUTH_LOCATION = /path/to/my.azureauth
57-
```
49+
```bash
50+
az account set --subscription <name or id>
51+
```
5852

5953
* Create a storage account.
6054

‎azureblobstoragelist/README.md

+17-23
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ List information about the blobs in a Blob Storage container in an Azure storage
88

99
* You must have a [Microsoft Azure](https://azure.microsoft.com/) subscription.
1010

11-
* You must have an Azure storage account.
11+
* You must have the following installed:
12+
* Python 3
13+
* Azure CLI
1214

1315
* The code was written for:
1416
* Python 3
@@ -24,37 +26,29 @@ List information about the blobs in a Blob Storage container in an Azure storage
2426

2527
## Using the code
2628

27-
* Configure your Azure access.
28-
29-
You must create an Azure AD service principal in order to enable application to connect resources into Azure. The service principal grants your application to manage resources in your Azure subscription.
29+
* Sign in Azure (Interactively).
3030

31-
The Azure SDKs Libraries for Java allow you to use several authentication schemes.
31+
The Azure CLI's default authentication method for logins uses a web browser and access token to sign in.
3232

33-
The application uses an authentication file for authenticating.
33+
1. Run the Azure CLI login command.
3434

35-
The credentials are taken from `AZURE_AUTH_LOCATION` environment variable.
35+
```bash
36+
az login
37+
```
3638

37-
You can create a service principal and generate this file using Azure CLI 2.0 or using the Azure cloud shell.
39+
If the CLI can open your default browser, it will do so and load an Azure sign-in page.
3840

39-
* Make sure you select your subscription by:
41+
Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
4042

41-
```bash
42-
az account set --subscription <name or id>
43-
```
43+
If no web browser is available or the web browser fails to open, use device code flow with az login --use-device-code.
4444

45-
and you have the privileges to create service principals.
45+
2. Sign in with your account credentials in the browser.
4646

47-
* Execute the following command for creating the service principal and the authentication file:
48-
49-
```bash
50-
az ad sp create-for-rbac --sdk-auth > my.azureauth
51-
```
52-
53-
* Set the `AZURE_AUTH_LOCATION` environment variable in your Operating System with the path of your authentication file.
47+
Make sure you select your subscription by:
5448

55-
```bash
56-
AZURE_AUTH_LOCATION = /path/to/my.azureauth
57-
```
49+
```bash
50+
az account set --subscription <name or id>
51+
```
5852

5953
* Create a storage account.
6054

‎azureblobstoragelistall/README.md

+17-23
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ List information about all Blob Storage containers and the blobs they contain in
88

99
* You must have a [Microsoft Azure](https://azure.microsoft.com/) subscription.
1010

11-
* You must have an Azure storage account.
11+
* You must have the following installed:
12+
* Python 3
13+
* Azure CLI
1214

1315
* The code was written for:
1416
* Python 3
@@ -24,37 +26,29 @@ List information about all Blob Storage containers and the blobs they contain in
2426

2527
## Using the code
2628

27-
* Configure your Azure access.
28-
29-
You must create an Azure AD service principal in order to enable application to connect resources into Azure. The service principal grants your application to manage resources in your Azure subscription.
29+
* Sign in Azure (Interactively).
3030

31-
The Azure SDKs Libraries for Java allow you to use several authentication schemes.
31+
The Azure CLI's default authentication method for logins uses a web browser and access token to sign in.
3232

33-
The application uses an authentication file for authenticating.
33+
1. Run the Azure CLI login command.
3434

35-
The credentials are taken from `AZURE_AUTH_LOCATION` environment variable.
35+
```bash
36+
az login
37+
```
3638

37-
You can create a service principal and generate this file using Azure CLI 2.0 or using the Azure cloud shell.
39+
If the CLI can open your default browser, it will do so and load an Azure sign-in page.
3840

39-
* Make sure you select your subscription by:
41+
Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
4042

41-
```bash
42-
az account set --subscription <name or id>
43-
```
43+
If no web browser is available or the web browser fails to open, use device code flow with az login --use-device-code.
4444

45-
and you have the privileges to create service principals.
45+
2. Sign in with your account credentials in the browser.
4646

47-
* Execute the following command for creating the service principal and the authentication file:
48-
49-
```bash
50-
az ad sp create-for-rbac --sdk-auth > my.azureauth
51-
```
52-
53-
* Set the `AZURE_AUTH_LOCATION` environment variable in your Operating System with the path of your authentication file.
47+
Make sure you select your subscription by:
5448

55-
```bash
56-
AZURE_AUTH_LOCATION = /path/to/my.azureauth
57-
```
49+
```bash
50+
az account set --subscription <name or id>
51+
```
5852

5953
* Create a storage account.
6054

‎azureblobstoragemove/README.md

+17-23
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Move a Blob from a Blob Storage container to another Blob Storage container in a
88

99
* You must have a [Microsoft Azure](https://azure.microsoft.com/) subscription.
1010

11-
* You must have an Azure storage account.
11+
* You must have the following installed:
12+
* Python 3
13+
* Azure CLI
1214

1315
* The code was written for:
1416
* Python 3
@@ -24,37 +26,29 @@ Move a Blob from a Blob Storage container to another Blob Storage container in a
2426

2527
## Using the code
2628

27-
* Configure your Azure access.
28-
29-
You must create an Azure AD service principal in order to enable application to connect resources into Azure. The service principal grants your application to manage resources in your Azure subscription.
29+
* Sign in Azure (Interactively).
3030

31-
The Azure SDKs Libraries for Java allow you to use several authentication schemes.
31+
The Azure CLI's default authentication method for logins uses a web browser and access token to sign in.
3232

33-
The application uses an authentication file for authenticating.
33+
1. Run the Azure CLI login command.
3434

35-
The credentials are taken from `AZURE_AUTH_LOCATION` environment variable.
35+
```bash
36+
az login
37+
```
3638

37-
You can create a service principal and generate this file using Azure CLI 2.0 or using the Azure cloud shell.
39+
If the CLI can open your default browser, it will do so and load an Azure sign-in page.
3840

39-
* Make sure you select your subscription by:
41+
Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
4042

41-
```bash
42-
az account set --subscription <name or id>
43-
```
43+
If no web browser is available or the web browser fails to open, use device code flow with az login --use-device-code.
4444

45-
and you have the privileges to create service principals.
45+
2. Sign in with your account credentials in the browser.
4646

47-
* Execute the following command for creating the service principal and the authentication file:
48-
49-
```bash
50-
az ad sp create-for-rbac --sdk-auth > my.azureauth
51-
```
52-
53-
* Set the `AZURE_AUTH_LOCATION` environment variable in your Operating System with the path of your authentication file.
47+
Make sure you select your subscription by:
5448

55-
```bash
56-
AZURE_AUTH_LOCATION = /path/to/my.azureauth
57-
```
49+
```bash
50+
az account set --subscription <name or id>
51+
```
5852

5953
* Create a storage account.
6054

‎azureblobstorageupload/README.md

+17-23
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Upload a local file to a Blob Storage container in an Azure storage account.
88

99
* You must have a [Microsoft Azure](https://azure.microsoft.com/) subscription.
1010

11-
* You must have an Azure storage account.
11+
* You must have the following installed:
12+
* Python 3
13+
* Azure CLI
1214

1315
* The code was written for:
1416
* Python 3
@@ -24,37 +26,29 @@ Upload a local file to a Blob Storage container in an Azure storage account.
2426

2527
## Using the code
2628

27-
* Configure your Azure access.
28-
29-
You must create an Azure AD service principal in order to enable application to connect resources into Azure. The service principal grants your application to manage resources in your Azure subscription.
29+
* Sign in Azure (Interactively).
3030

31-
The Azure SDKs Libraries for Java allow you to use several authentication schemes.
31+
The Azure CLI's default authentication method for logins uses a web browser and access token to sign in.
3232

33-
The application uses an authentication file for authenticating.
33+
1. Run the Azure CLI login command.
3434

35-
The credentials are taken from `AZURE_AUTH_LOCATION` environment variable.
35+
```bash
36+
az login
37+
```
3638

37-
You can create a service principal and generate this file using Azure CLI 2.0 or using the Azure cloud shell.
39+
If the CLI can open your default browser, it will do so and load an Azure sign-in page.
3840

39-
* Make sure you select your subscription by:
41+
Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
4042

41-
```bash
42-
az account set --subscription <name or id>
43-
```
43+
If no web browser is available or the web browser fails to open, use device code flow with az login --use-device-code.
4444

45-
and you have the privileges to create service principals.
45+
2. Sign in with your account credentials in the browser.
4646

47-
* Execute the following command for creating the service principal and the authentication file:
48-
49-
```bash
50-
az ad sp create-for-rbac --sdk-auth > my.azureauth
51-
```
52-
53-
* Set the `AZURE_AUTH_LOCATION` environment variable in your Operating System with the path of your authentication file.
47+
Make sure you select your subscription by:
5448

55-
```bash
56-
AZURE_AUTH_LOCATION = /path/to/my.azureauth
57-
```
49+
```bash
50+
az account set --subscription <name or id>
51+
```
5852

5953
* Create a storage account.
6054

‎azureeventgridsendevent/README.md

+18-22
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ It handles an Event Grid and sends events to an Event Grid Topic.
88

99
* You must have a [Microsoft Azure](https://azure.microsoft.com/) subscription.
1010

11+
* You must have the following installed:
12+
* Python 3
13+
* Azure CLI
14+
1115
* The code was written for:
1216
* Python 3
1317
* Azure SDK for Python: New Client Libraries (Azure Event Grid library v4)
@@ -22,37 +26,29 @@ It handles an Event Grid and sends events to an Event Grid Topic.
2226

2327
## Using the code
2428

25-
* Configure your Azure access.
29+
* Sign in Azure (Interactively).
2630

27-
You must create an Azure AD service principal in order to enable application to connect resources into Azure. The service principal grants your application to manage resources in your Azure subscription.
31+
The Azure CLI's default authentication method for logins uses a web browser and access token to sign in.
2832

29-
The Azure SDKs Libraries for Java allow you to use several authentication schemes.
33+
1. Run the Azure CLI login command.
3034

31-
The application uses an authentication file for authenticating.
35+
```bash
36+
az login
37+
```
3238

33-
The credentials are taken from `AZURE_AUTH_LOCATION` environment variable.
39+
If the CLI can open your default browser, it will do so and load an Azure sign-in page.
3440

35-
You can create a service principal and generate this file using Azure CLI 2.0 or using the Azure cloud shell.
41+
Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
3642

37-
* Make sure you select your subscription by:
43+
If no web browser is available or the web browser fails to open, use device code flow with az login --use-device-code.
3844

39-
```bash
40-
az account set --subscription <name or id>
41-
```
45+
2. Sign in with your account credentials in the browser.
4246

43-
and you have the privileges to create service principals.
47+
Make sure you select your subscription by:
4448

45-
* Execute the following command for creating the service principal and the authentication file:
46-
47-
```bash
48-
az ad sp create-for-rbac --sdk-auth > my.azureauth
49-
```
50-
51-
* Set the `AZURE_AUTH_LOCATION` environment variable in your Operating System with the path of your authentication file.
52-
53-
```bash
54-
AZURE_AUTH_LOCATION = /path/to/my.azureauth
55-
```
49+
```bash
50+
az account set --subscription <name or id>
51+
```
5652

5753
* Create an Event Grid Topic.
5854

‎azureeventhubreceiveevent/README.md

+18-22
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ It handles an Event Hub and receive events from an event hub event stream.
88

99
* You must have a [Microsoft Azure](https://azure.microsoft.com/) subscription.
1010

11+
* You must have the following installed:
12+
* Python 3
13+
* Azure CLI
14+
1115
* The code was written for:
1216
* Python 3
1317
* Azure SDK for Python: New Client Libraries (Azure Event Hub library v5)
@@ -22,37 +26,29 @@ It handles an Event Hub and receive events from an event hub event stream.
2226

2327
## Using the code
2428

25-
* Configure your Azure access.
29+
* Sign in Azure (Interactively).
2630

27-
You must create an Azure AD service principal in order to enable application to connect resources into Azure. The service principal grants your application to manage resources in your Azure subscription.
31+
The Azure CLI's default authentication method for logins uses a web browser and access token to sign in.
2832

29-
The Azure SDKs Libraries for Java allow you to use several authentication schemes.
33+
1. Run the Azure CLI login command.
3034

31-
The application uses an authentication file for authenticating.
35+
```bash
36+
az login
37+
```
3238

33-
The credentials are taken from `AZURE_AUTH_LOCATION` environment variable.
39+
If the CLI can open your default browser, it will do so and load an Azure sign-in page.
3440

35-
You can create a service principal and generate this file using Azure CLI 2.0 or using the Azure cloud shell.
41+
Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
3642

37-
* Make sure you select your subscription by:
43+
If no web browser is available or the web browser fails to open, use device code flow with az login --use-device-code.
3844

39-
```bash
40-
az account set --subscription <name or id>
41-
```
45+
2. Sign in with your account credentials in the browser.
4246

43-
and you have the privileges to create service principals.
47+
Make sure you select your subscription by:
4448

45-
* Execute the following command for creating the service principal and the authentication file:
46-
47-
```bash
48-
az ad sp create-for-rbac --sdk-auth > my.azureauth
49-
```
50-
51-
* Set the `AZURE_AUTH_LOCATION` environment variable in your Operating System with the path of your authentication file.
52-
53-
```bash
54-
AZURE_AUTH_LOCATION = /path/to/my.azureauth
55-
```
49+
```bash
50+
az account set --subscription <name or id>
51+
```
5652

5753
* Create an Event Hubs Namespace and an Event Hub.
5854

‎azureeventhubsendevent/README.md

+18-22
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ It handles an Event Hub and send events to an event hub event stream.
88

99
* You must have a [Microsoft Azure](https://azure.microsoft.com/) subscription.
1010

11+
* You must have the following installed:
12+
* Python 3
13+
* Azure CLI
14+
1115
* The code was written for:
1216
* Python 3
1317
* Azure SDK for Python: New Client Libraries (Azure Event Hub library v5)
@@ -22,37 +26,29 @@ It handles an Event Hub and send events to an event hub event stream.
2226

2327
## Using the code
2428

25-
* Configure your Azure access.
29+
* Sign in Azure (Interactively).
2630

27-
You must create an Azure AD service principal in order to enable application to connect resources into Azure. The service principal grants your application to manage resources in your Azure subscription.
31+
The Azure CLI's default authentication method for logins uses a web browser and access token to sign in.
2832

29-
The Azure SDKs Libraries for Java allow you to use several authentication schemes.
33+
1. Run the Azure CLI login command.
3034

31-
The application uses an authentication file for authenticating.
35+
```bash
36+
az login
37+
```
3238

33-
The credentials are taken from `AZURE_AUTH_LOCATION` environment variable.
39+
If the CLI can open your default browser, it will do so and load an Azure sign-in page.
3440

35-
You can create a service principal and generate this file using Azure CLI 2.0 or using the Azure cloud shell.
41+
Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
3642

37-
* Make sure you select your subscription by:
43+
If no web browser is available or the web browser fails to open, use device code flow with az login --use-device-code.
3844

39-
```bash
40-
az account set --subscription <name or id>
41-
```
45+
2. Sign in with your account credentials in the browser.
4246

43-
and you have the privileges to create service principals.
47+
Make sure you select your subscription by:
4448

45-
* Execute the following command for creating the service principal and the authentication file:
46-
47-
```bash
48-
az ad sp create-for-rbac --sdk-auth > my.azureauth
49-
```
50-
51-
* Set the `AZURE_AUTH_LOCATION` environment variable in your Operating System with the path of your authentication file.
52-
53-
```bash
54-
AZURE_AUTH_LOCATION = /path/to/my.azureauth
55-
```
49+
```bash
50+
az account set --subscription <name or id>
51+
```
5652

5753
* Create an Event Hubs Namespace and an Event Hub.
5854

0 commit comments

Comments
 (0)
Please sign in to comment.