Skip to content

Commit df36e3c

Browse files
committed
.NET Quickstart
1 parent d1051a3 commit df36e3c

File tree

6 files changed

+84
-79
lines changed

6 files changed

+84
-79
lines changed

articles/event-hubs/event-hubs-dotnet-standard-getstarted-send.md

Lines changed: 67 additions & 63 deletions
Large diffs are not rendered by default.
8.6 KB
Loading
17.3 KB
Loading

includes/passwordless/event-hub/event-hub-passwordless-template-tabbed.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: storage
55
author: alexwolfmsft
66
ms.service: azure-storage
77
ms.topic: include
8-
ms.date: 09/09/2022
8+
ms.date: 03/24/2025
99
ms.author: alexwolf
1010
ms.custom: include file
1111
---
@@ -14,10 +14,25 @@ This quick start shows you two ways of connecting to Azure Event Hubs:
1414
- Passwordless (Microsoft Entra authentication)
1515
- Connection string
1616

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.
1818

1919
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).
2020

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+
2136
## [Passwordless](#tab/passwordless)
2237

2338
<a name='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:
3954

4055
:::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.":::
4156

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.
5657

5758
---
-4.51 KB
Loading
2.6 KB
Loading

0 commit comments

Comments
 (0)