title | description | author | ms.service | services | ms.topic | ms.date | ms.author | ms.custom |
---|---|---|---|---|---|---|---|---|
include file |
include file |
robinsh |
iot-hub |
iot-hub |
include |
04/03/2020 |
robinsh |
include file |
To create a shared access policy that grants service connect and registry write permissions and to get a connection string for this policy, follow these steps:
-
In the Azure portal, select Resource groups. Select the resource group where your hub is located, and then select your hub from the list of resources.
-
On the left-side pane of your hub, select Shared access policies.
-
From the top menu above the list of policies, select Add.
-
Under Add a shared access policy, enter a descriptive name for your policy, such as serviceAndRegistryReadWrite. Under Permissions, select Registry write and Service connect, and then select Create. (The Registry read permission is included automatically when you select Registry write.)
-
Select your new policy from the list of policies.
-
Under Shared access keys, select the copy icon for the Connection string -- primary key and save the value.
For more information about IoT Hub shared access policies and permissions, see Access control and permissions.