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/service-bus/service-bus-assign-roles.md
+10-46Lines changed: 10 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,65 +17,29 @@ The following example assigns the `Azure Service Bus Data Owner` role to your us
17
17
### Azure built-in roles for Azure Service Bus
18
18
For Azure Service Bus, the management of namespaces and all related resources through the Azure portal and the Azure resource management API is already protected using the Azure RBAC model. Azure provides the below Azure built-in roles for authorizing access to a Service Bus namespace:
19
19
20
-
-[Azure Service Bus Data Owner](../../../articles/role-based-access-control/built-in-roles.md#azure-service-bus-data-owner): Enables data access to Service Bus namespace and its entities (queues, topics, subscriptions, and filters)
20
+
-[Azure Service Bus Data Owner](../../../articles/role-based-access-control/built-in-roles.md#azure-service-bus-data-owner): Enables data access to Service Bus namespace and its entities (queues, topics, subscriptions, and filters). A member of this role can send and receive messages from queues or topics/subscriptions.
21
21
-[Azure Service Bus Data Sender](../../../articles/role-based-access-control/built-in-roles.md#azure-service-bus-data-sender): Use this role to give the send access to Service Bus namespace and its entities.
22
22
-[Azure Service Bus Data Receiver](../../../articles/role-based-access-control/built-in-roles.md#azure-service-bus-data-receiver): Use this role to give the receive access to Service Bus namespace and its entities.
23
23
24
24
If you want to create a custom role, see [Rights required for Service Bus operations](../../../articles/service-bus-messaging/service-bus-sas.md#rights-required-for-service-bus-operations).
25
25
26
-
> [!IMPORTANT]
27
-
> In most cases, it will take a minute or two for the role assignment to propagate in Azure. In rare cases, it may take up to eight minutes. If you receive authentication errors when you first run your code, wait a few moments and try again.
26
+
### Add Azure AD user to Azure Service Bus Owner role
28
27
29
-
### [Azure portal](#tab/roles-azure-portal)
28
+
Add your Azure AD user name to the **Azure Service Bus Data Owner** role at the Service Bus namespace level. It will allow an app running in the context of your user account to send messages to a queue or a topic, and receive messages from a queue or a topic's subscription.
30
29
31
-
1. In the Azure portal, locate your service bus namespace using the main search bar or left navigation.
30
+
> [!IMPORTANT]
31
+
> In most cases, it will take a minute or two for the role assignment to propagate in Azure. In rare cases, it may take up to **eight minutes**. If you receive authentication errors when you first run your code, wait a few moments and try again.
32
32
33
+
1. If you don't have the Service Bus Namespace page open in the Azure portal, locate your Service Bus namespace using the main search bar or left navigation.
33
34
2. On the overview page, select **Access control (IAM)** from the left-hand menu.
34
-
35
35
3. On the **Access control (IAM)** page, select the **Role assignments** tab.
36
-
37
36
4. Select **+ Add** from the top menu and then **Add role assignment** from the resulting drop-down menu.
38
37
39
38
:::image type="content" source="media/service-bus-assign-roles/add-role.png" alt-text="A screenshot showing how to assign a role.":::
40
-
41
39
5. Use the search box to filter the results to the desired role. For this example, search for `Azure Service Bus Data Owner` and select the matching result. Then choose **Next**.
40
+
1. Under **Assign access to**, select **User, group, or service principal**, and then choose **+ Select members**.
42
41
43
-
6. Under **Assign access to**, select **User, group, or service principal**, and then choose **+ Select members**.
44
-
45
-
7. In the dialog, search for your Azure AD username (usually your *user@domain* email address) and then choose **Select** at the bottom of the dialog.
46
-
47
-
8. Select **Review + assign** to go to the final page, and then **Review + assign** again to complete the process.
48
-
49
-
### [Azure CLI](#tab/roles-azure-cli)
50
-
51
-
To assign a role at the resource level using the Azure CLI, you first must retrieve the resource ID using the `az servicebus namespace show` command. You can filter the output properties using the `--query` parameter.
52
-
53
-
```azurecli
54
-
az servicebus namespace show -g '<your-service-bus-resource-group>' -n '<your-service-bus-name> --query id
55
-
```
56
-
57
-
Copy the output `Id` from the preceding command. You can then assign roles using the [az role](/cli/azure/role) command of the Azure CLI.
58
-
59
-
```azurecli
60
-
az role assignment create --assignee "<user@domain>" \
61
-
--role "Azure Service Bus Data Owner" \
62
-
--scope "<your-resource-id>"
63
-
```
64
-
65
-
### [PowerShell](#tab/roles-powershell)
66
-
67
-
To assign a role at the resource level using Azure PowerShell, you first must retrieve the resource ID using the `Get-AzResource` command.
Copy the `Id` value from the preceding command output. You can then assign roles using the [New-AzRoleAssignment](/powershell/module/az.resources/new-azroleassignment) command in PowerShell.
74
-
75
-
```azurepowershell
76
-
New-AzRoleAssignment -SignInName <user@domain> `
77
-
-RoleDefinitionName "Azure Service Bus Data Owner" `
78
-
-Scope <yourStorageAccountId>
79
-
```
42
+
43
+
1. In the dialog, search for your Azure AD username (usually your *user@domain* email address) and then choose **Select** at the bottom of the dialog.
44
+
1. Select **Review + assign** to go to the final page, and then **Review + assign** again to complete the process.
Copy file name to clipboardExpand all lines: includes/passwordless/service-bus/service-bus-create-namespace-portal-passwordless.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ To begin using Service Bus messaging entities in Azure, you must first create a
16
16
To create a namespace:
17
17
18
18
1. Sign in to the [Azure portal](https://portal.azure.com)
19
-
2. In the left navigation pane of the portal, select **+ Create a resource**, select **Integration**, and then select **Service Bus**.
19
+
2. In the left navigation pane of the portal, select **All services**, select **Integration** from the list of categories, hover the mouse over **Service Bus**, and then select **Create** on the Service Bus tile.
20
20
21
21
:::image type="content" source="./media/service-bus-create-namespace-portal/create-resource-service-bus-menu.png" alt-text="Image showing selection of Create a resource, Integration, and then Service Bus in the menu.":::
22
22
3. In the **Basics** tag of the **Create namespace** page, follow these steps:
@@ -32,7 +32,7 @@ To create a namespace:
32
32
1. For **Pricing tier**, select the pricing tier (Basic, Standard, or Premium) for the namespace. For this quickstart, select **Standard**.
33
33
34
34
> [!IMPORTANT]
35
-
> If you want to use [Topics and subscriptions](../../../articles/service-bus-messaging/service-bus-queues-topics-subscriptions.md#topics-and-subscriptions), choose either Standard or Premium. Topics/subscriptions aren't supported in the Basic pricing tier.
35
+
> If you want to use [Topics and subscriptions](../../../articles/service-bus-messaging/service-bus-queues-topics-subscriptions.md#topics-and-subscriptions), choose either Standard or [Premium](../../../articles/service-bus-messaging/service-bus-premium-messaging.md). Topics/subscriptions aren't supported in the Basic pricing tier.
36
36
37
37
If you selected the **Premium** pricing tier, specify the number of **messaging units**. The premium tier provides resource isolation at the CPU and memory level so that each workload runs in isolation. This resource container is called a messaging unit. A premium namespace has at least one messaging unit. You can select 1, 2, 4, 8 or 16 messaging units for each Service Bus Premium namespace. For more information, see [Service Bus Premium Messaging](../../../articles/service-bus-messaging/service-bus-premium-messaging.md).
38
38
@@ -45,4 +45,4 @@ To create a namespace:
45
45
:::image type="content" source="./media/service-bus-create-namespace-portal/deployment-alert.png" alt-text="Image showing the deployment succeeded page with the Go to resource link.":::
46
46
5. You see the home page for your service bus namespace.
47
47
48
-
:::image type="content" source="./media/service-bus-create-namespace-portal/service-bus-namespace-home-page.png" alt-text="Image showing the home page of the Service Bus namespace created." :::
48
+
:::image type="content" source="./media/service-bus-create-namespace-portal/service-bus-namespace-home-page.png" lightbox="./media/service-bus-create-namespace-portal/service-bus-namespace-home-page.png" alt-text="Image showing the home page of the Service Bus namespace created." :::
Copy file name to clipboardExpand all lines: includes/passwordless/service-bus/service-bus-passwordless-template-tabbed.md
+12-20Lines changed: 12 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,22 +12,6 @@ ms.custom: include file
12
12
13
13
14
14
15
-
## [Connection String](#tab/connection-string)
16
-
17
-
## Get the connection string
18
-
Creating a new namespace automatically generates an initial Shared Access Signature (SAS) policy with primary and secondary keys, and primary and secondary connection strings that each grant full control over all aspects of the namespace. See [Service Bus 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.
19
-
20
-
A client can use the connection string to connect to the Service Bus namespace. To copy the primary connection string for your namespace, follow these steps:
21
-
22
-
1. On the **Service Bus Namespace** page, select **Shared access policies** on the left menu.
23
-
3. On the **Shared access policies** page, select **RootManageSharedAccessKey**.
24
-
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.
25
-
26
-
:::image type="content" source="./media/service-bus-passwordless-template-tabbed/connection-string.png" lightbox="./media/service-bus-create-namespace-portal/connection-string.png" alt-text="Screenshot shows an SAS policy called RootManageSharedAccessKey, which includes keys and connection strings.":::
27
-
28
-
You can use this page to copy primary key, secondary key, primary connection string, and secondary connection string.
29
-
30
-
31
15
## [Passwordless](#tab/passwordless)
32
16
33
17
## Authenticate the app to Azure
@@ -40,13 +24,21 @@ A client can use the connection string to connect to the Service Bus namespace.
You can authorize access to the service bus namespace using the following steps:
28
+
## [Connection String](#tab/connection-string)
29
+
30
+
## Get the connection string
31
+
Creating a new namespace automatically generates an initial Shared Access Signature (SAS) policy with primary and secondary keys, and primary and secondary connection strings that each grant full control over all aspects of the namespace. See [Service Bus 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.
32
+
33
+
A client can use the connection string to connect to the Service Bus namespace. To copy the primary connection string for your namespace, follow these steps:
1. On the **Service Bus Namespace** page, select **Shared access policies** on the left menu.
36
+
3. On the **Shared access policies** page, select **RootManageSharedAccessKey**.
37
+
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.
38
+
39
+
:::image type="content" source="./media/service-bus-passwordless-template-tabbed/connection-string.png" lightbox="./media/service-bus-create-namespace-portal/connection-string.png" alt-text="Screenshot shows an SAS policy called RootManageSharedAccessKey, which includes keys and connection strings.":::
0 commit comments