You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: includes/passwordless/event-hub/event-hub-passwordless-template-tabbed.md
+17-16Lines changed: 17 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ services: storage
5
5
author: alexwolfmsft
6
6
ms.service: azure-storage
7
7
ms.topic: include
8
-
ms.date: 09/09/2022
8
+
ms.date: 03/24/2025
9
9
ms.author: alexwolf
10
10
ms.custom: include file
11
11
---
@@ -14,10 +14,25 @@ This quick start shows you two ways of connecting to Azure Event Hubs:
14
14
- Passwordless (Microsoft Entra authentication)
15
15
- Connection string
16
16
17
-
The first option shows you how to use your security principal in Azure **Active Directory and role-based access control (RBAC)** to connect to an Event Hubs namespace. You don't need to worry about having hard-coded connection strings in your code or in a configuration file or in a secure storage like Azure Key Vault.
17
+
The first option shows you how to use your security principal in Azure **Microsoft Entra ID and role-based access control (RBAC)** to connect to an Event Hubs namespace. You don't need to worry about having hard-coded connection strings in your code or in a configuration file or in a secure storage like Azure Key Vault.
18
18
19
19
The second option shows you how to use a **connection string** to connect to an Event Hubs namespace. If you're new to Azure, you may find the connection string option easier to follow. We recommend using the passwordless option in real-world applications and production environments. For more information, see [Authentication and authorization](../../../articles/service-bus-messaging/service-bus-authentication-and-authorization.md). You can also read more about passwordless authentication on the [overview page](/dotnet/azure/sdk/authentication?tabs=command-line).
20
20
21
+
## [Connection String](#tab/connection-string)
22
+
23
+
## Get the connection string
24
+
Creating a new namespace automatically generates an initial Shared Access Signature (SAS) policy with primary and secondary keys and connection strings that each grant full control over all aspects of the namespace. See [Event Hubs authentication and authorization](../../../articles/service-bus-messaging/service-bus-authentication-and-authorization.md) for information about how to create rules with more constrained rights for regular senders and receivers.
25
+
26
+
A client can use the connection string to connect to the Event Hubs namespace. To copy the primary connection string for your namespace, follow these steps:
27
+
28
+
1. On the **Event Hub Namespace** page, select **Shared access policies** on the left menu.
29
+
3. On the **Shared access policies** page, select **RootManageSharedAccessKey**.
30
+
4. In the **Policy: RootManageSharedAccessKey** window, select the copy button next to **Primary Connection String**, to copy the connection string to your clipboard for later use. Paste this value into Notepad or some other temporary location.
31
+
32
+
:::image type="content" source="./media/event-hub-passwordless-template-tabbed/connection-string.png"alt-text="Screenshot shows an SAS policy called RootManageSharedAccessKey, which includes keys and connection strings.":::
33
+
34
+
You can use this page to copy primary key, secondary key, primary connection string, and secondary connection string.
35
+
21
36
## [Passwordless](#tab/passwordless)
22
37
23
38
<aname='assign-roles-to-your-azure-ad-user'></a>
@@ -39,19 +54,5 @@ You can authorize access to the service bus namespace using the following steps:
39
54
40
55
:::image type="content" source="../../../articles/storage/blobs/media/storage-quickstart-blobs-dotnet/sign-in-visual-studio-account-small.png" alt-text="Screenshot showing the account selection.":::
41
56
42
-
## [Connection String](#tab/connection-string)
43
-
44
-
## Get the connection string
45
-
Creating a new namespace automatically generates an initial Shared Access Signature (SAS) policy with primary and secondary keys and connection strings that each grant full control over all aspects of the namespace. See [Event Hubs authentication and authorization](../../../articles/service-bus-messaging/service-bus-authentication-and-authorization.md) for information about how to create rules with more constrained rights for regular senders and receivers.
46
-
47
-
A client can use the connection string to connect to the Event Hubs namespace. To copy the primary connection string for your namespace, follow these steps:
48
-
49
-
1. On the **Event Hub Namespace** page, select **Shared access policies** on the left menu.
50
-
3. On the **Shared access policies** page, select **RootManageSharedAccessKey**.
51
-
4. In the **Policy: RootManageSharedAccessKey** window, select the copy button next to **Primary Connection String**, to copy the connection string to your clipboard for later use. Paste this value into Notepad or some other temporary location.
52
-
53
-
:::image type="content" source="./media/event-hub-passwordless-template-tabbed/connection-string.png"alt-text="Screenshot shows an SAS policy called RootManageSharedAccessKey, which includes keys and connection strings.":::
54
-
55
-
You can use this page to copy primary key, secondary key, primary connection string, and secondary connection string.
0 commit comments