Skip to content

Commit 2a1653e

Browse files
authored
Merge pull request #258965 from shikhagarg1/main
Make informational changes in the managing users page
2 parents 3eeabc8 + 86ea652 commit 2a1653e

File tree

2 files changed

+57
-40
lines changed

2 files changed

+57
-40
lines changed

articles/energy-data-services/how-to-manage-users.md

Lines changed: 57 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,57 +10,72 @@ ms.custom: template-how-to
1010
---
1111

1212
# How to manage users
13-
In this article, you'll know how to manage users in Azure Data Manager for Energy. It uses the [entitlements API](https://community.opengroup.org/osdu/platform/security-and-compliance/entitlements/-/tree/master/) and acts as a group-based authorization system for data partitions within Azure Data Manager for Energy instance. For more information about Azure Data Manager for Energy entitlements, see [entitlement services](concepts-entitlements.md).
13+
In this article, you'll learn how to manage users and their memberships in OSDU groups in Azure Data Manager for Energy. [Entitlements APIs](https://community.opengroup.org/osdu/platform/security-and-compliance/entitlements/-/tree/master/) are used to add or remove users to OSDU groups and to check the entitlements when the user tries to access the OSDU services or data. For more information about OSDU groups, see [entitlement services](concepts-entitlements.md).
1414

1515

1616
## Prerequisites
17+
1. Create an Azure Data Manager for Energy instance using the tutorial at [How to create Azure Data Manager for Energy instance](quickstart-create-microsoft-energy-data-services-instance.md).
18+
2. Generate the access token needed to call the Entitlements APIs.
19+
3. Get various parameters of your instance such as client-id, client-secret, etc.
20+
4. Keep all these parameter values handy as they will be needed for executing different user management requests via the Entitlements API.
1721

18-
Create an Azure Data Manager for Energy instance using the tutorial at [How to create Azure Data Manager for Energy instance](quickstart-create-microsoft-energy-data-services-instance.md).
19-
20-
You will need to pass parameters for generating the access token, which you'll need to make valid calls to the Entitlements API of your Azure Data Manager for Energy instance. You will also need these parameters for different user management requests to the Entitlements API. Hence Keep the following values handy for these actions.
21-
22+
## Fetch Parameters
2223
#### Find `tenant-id`
23-
Navigate to the Microsoft Entra account for your organization. One way to do so is by searching for "Microsoft Entra ID" in the Azure portal's search bar. Once there, locate `tenant-id` under the basic information section in the *Overview* tab. Copy the `tenant-id` and paste in an editor to be used later.
24+
1. Navigate to the Microsoft Entra account for your organization. You can search for "Microsoft Entra ID" in the Azure portal's search bar.
25+
2. Locate `tenant-id` under the basic information section in the *Overview* tab.
26+
3. Copy the `tenant-id` and paste it into an editor to be used later.
2427

2528
:::image type="content" source="media/how-to-manage-users/azure-active-directory.png" alt-text="Screenshot of search for Microsoft Entra I D.":::
2629

2730
:::image type="content" source="media/how-to-manage-users/tenant-id.png" alt-text="Screenshot of finding the tenant-id.":::
2831

2932
#### Find `client-id`
30-
Often called `app-id`, it's the same value that you used to register your application during the provisioning of your [Azure Data Manager for Energy instance](quickstart-create-microsoft-energy-data-services-instance.md). You'll find the `client-id` in the *Essentials* pane of Azure Data Manager for Energy *Overview* page. Copy the `client-id` and paste in an editor to be used later.
33+
It's the same value that you used to register your application during the provisioning of your [Azure Data Manager for Energy instance](quickstart-create-microsoft-energy-data-services-instance.md). It is often referred to as `app-id`.
34+
35+
1. Find the `client-id` in the *Essentials* pane of Azure Data Manager for Energy *Overview* page.
36+
2. Copy the `client-id` and paste it into an editor to be used later.
37+
3. Currently, one Azure Data Manager for Energy instance allows one app-id to be as associated with one instance.
3138

3239
> [!IMPORTANT]
33-
> The 'client-id' that is passed as values in the entitlement API calls needs to be the same which was used for provisioning of your Azure Data Manager for Energy instance.
40+
> The 'client-id' that is passed as values in the entitlement API calls needs to be the same that was used for provisioning your Azure Data Manager for the Energy instance.
3441
3542
:::image type="content" source="media/how-to-manage-users/client-id-or-app-id.png" alt-text="Screenshot of finding the client-id for your registered App.":::
3643

3744
#### Find `client-secret`
38-
Sometimes called an application password, a `client-secret` is a string value your app can use in place of a certificate to identity itself. Navigate to *App Registrations*. Once there, open 'Certificates & secrets' under the *Manage* section. Create a `client-secret` for the `client-id` that you used to create your Azure Data Manager for Energy instance, you can add one now by clicking on *New Client Secret*. Record the secret's `value` for use in your client application code.
45+
A `client-secret` is a string value your app can use in place of a certificate to identify itself. It is sometimes referred to as an application password.
46+
47+
1. Navigate to *App Registrations*.
48+
2. Open 'Certificates & secrets' under the *Manage* section.
49+
3. Create a `client-secret` for the `client-id` that you used to create your Azure Data Manager for Energy instance.
50+
4. Add one now by clicking on *New Client Secret*.
51+
5. Record the secret's `value` for later use in your client application code.
52+
6. The Service Principal [SPN] of the app id and client secret has the Infra Admin access to the instance.
3953

4054
> [!CAUTION]
41-
> Don't forget to record the secret's value for use in your client application code. This secret value is never displayed again after you leave this page at the time of creation of 'client secret'.
55+
> Don't forget to record the secret's value. This secret value is never displayed again after you leave this page of 'client secret' creation.
4256
4357
:::image type="content" source="media/how-to-manage-users/client-secret.png" alt-text="Screenshot of finding the client secret.":::
4458

45-
#### Find the `url`for your Azure Data Manager for Energy instance
46-
Navigate to your Azure Data Manager for Energy *Overview* page on Azure portal. Copy the URI from the essentials pane.
59+
#### Find the `URL` for your Azure Data Manager for Energy instance
60+
1. Navigate to your Azure Data Manager for Energy *Overview* page on the Azure portal.
61+
2. Copy the URI from the essentials pane.
4762

48-
:::image type="content" source="media/how-to-manage-users/endpoint-url.png" alt-text="Screenshot of finding the url from Azure Data Manager for Energy instance.":::
63+
:::image type="content" source="media/how-to-manage-users/endpoint-url.png" alt-text="Screenshot of finding the URL from Azure Data Manager for Energy instance.":::
4964

50-
#### Find the `data-partition-id` for your group
51-
You have two ways to get the list of data-partitions in your Azure Data Manager for Energy instance.
52-
- One option is to navigate *Data Partitions* menu item under the Advanced section of your Azure Data Manager for Energy UI.
65+
#### Find the `data-partition-id`
66+
1. You have two ways to get the list of data partitions in your Azure Data Manager for Energy instance. '
67+
2. One option is to navigate the *Data Partitions* menu item under the Advanced section of your Azure Data Manager for Energy UI.
5368

5469
:::image type="content" source="media/how-to-manage-users/data-partition-id.png" alt-text="Screenshot of finding the data-partition-id from the Azure Data Manager for Energy instance.":::
5570

56-
- Another option is by clicking on the *view* below the *data partitions* field in the essentials pane of your Azure Data Manager for Energy *Overview* page.
71+
3. Another option is to click on the *view* below the *data partitions* field in the essentials pane of your Azure Data Manager for Energy *Overview* page.
5772

5873
:::image type="content" source="media/how-to-manage-users/data-partition-id-second-option.png" alt-text="Screenshot of finding the data-partition-id from the Azure Data Manager for Energy instance overview page.":::
5974

6075
:::image type="content" source="media/how-to-manage-users/data-partition-id-second-option-step-2.png" alt-text="Screenshot of finding the data-partition-id from the Azure Data Manager for Energy instance overview page with the data partitions.":::
6176
## Generate access token
6277

63-
You need to generate access token to use entitlements API. Run the below curl command in Azure Cloud Bash after replacing the placeholder values with the corresponding values found earlier in the pre-requisites step.
78+
1. Run the below curl command in Azure Cloud Bash after replacing the placeholder values with the corresponding values found earlier in the above steps.
6479

6580
**Request format**
6681

@@ -84,31 +99,32 @@ curl --location --request POST 'https://login.microsoftonline.com/<tenant-id>/oa
8499
"access_token": "abcdefgh123456............."
85100
}
86101
```
87-
Copy the `access_token` value from the response. You'll need it to pass as one of the headers in all calls to the Entitlements API of your Azure Data Manager for Energy instance.
88-
89-
## User management activities
102+
2. Copy the `access_token` value from the response. You'll need it to pass as one of the headers in all calls to the Entitlements APIs.
90103

91-
You can manage users' access to your Azure Data Manager for Energy instance or data partitions. As a prerequisite for this step, you need to find the 'object-id' (OID) of the user(s) first. If you are managing an application's access to your instance or data partition, then you must find and use the application ID (or client ID) instead of the OID.
104+
## Fetch OID
105+
`object-id` (OID) is the Microsoft Entra user Object ID.
92106

93-
You'll need to input the `object-id` (OID) of the users (or the application or client ID if managing access for an application) as parameters in the calls to the Entitlements API of your Azure Data Manager for Energy Instance. `object-id` (OID) is the Microsoft Entra user Object ID.
107+
1. Find the 'object-id' (OID) of the user(s) first. If you are managing an application's access, you must find and use the application ID (or client ID) instead of the OID.
108+
2. Input the `object-id` (OID) of the users (or the application or client ID if managing access for an application) as parameters in the calls to the Entitlements API of your Azure Data Manager for Energy Instance.
94109

95110
:::image type="content" source="media/how-to-manage-users/azure-active-directory-object-id.png" alt-text="Screenshot of finding the object-id from Microsoft Entra I D.":::
96111

97112
:::image type="content" source="media/how-to-manage-users/profile-object-id.png" alt-text="Screenshot of finding the object-id from the profile.":::
98113

99-
### Get the list of all available groups
114+
## Get the list of all available groups
100115

101-
Run the below curl command in Azure Cloud Bash to get all the groups that are available for your Azure Data Manager for Energy instance and its data partitions.
116+
Run the below curl command in Azure Cloud Bash to get all the groups that are available for your Azure Data Manager for the Energy instance and its data partitions.
102117

103118
```bash
104119
curl --location --request GET "https://<URI>/api/entitlements/v2/groups/" \
105120
--header 'data-partition-id: <data-partition>' \
106121
--header 'Authorization: Bearer <access_token>'
107122
```
108123

109-
### Add user(s) to a users group
124+
## Add user(s) to a OSDU group
110125

111-
Run the below curl command in Azure Cloud Bash to add user(s) to the "Users" group using Entitlement service.
126+
1. Run the below curl command in Azure Cloud Bash to add the user(s) to the "Users" group using the Entitlement service.
127+
2. The value to be sent for the param **"email"** is the **Object_ID (OID)** of the user and not the user's email.
112128

113129
```bash
114130
curl --location --request POST 'https://<URI>/api/entitlements/v2/groups/users@<data-partition-id>.dataservices.energy/members' \
@@ -121,8 +137,6 @@ Run the below curl command in Azure Cloud Bash to add user(s) to the "Users" gro
121137
}'
122138
```
123139

124-
The value to be sent for the param **"email"** is the **Object_ID (OID)** of the user and not the user's email
125-
126140
**Sample request**
127141

128142
Consider an Azure Data Manager for Energy instance named "medstest" with a data partition named "dp1"
@@ -146,10 +160,14 @@ Consider an Azure Data Manager for Energy instance named "medstest" with a data
146160
"role": "MEMBER"
147161
}
148162
```
163+
> [!IMPORTANT]
164+
> The app-id is the default OWNER of all the groups.
165+
:::image type="content" source="media/how-to-manage-users/appid.png" alt-text="Screenshot of app-d in Microsoft Entra ID.":::
149166

150-
### Add user(s) to an entitlements group
167+
## Add user(s) to an entitlements group
151168

152-
Run the below curl command in Azure Cloud Bash to add user(s) to an entitlement group using Entitlement service.
169+
1. Run the below curl command in Azure Cloud Bash to add the user(s) to an entitlement group using the Entitlement service.
170+
2. The value to be sent for the param **"email"** is the **Object_ID (OID)** of the user and not the user's email.
153171

154172
```bash
155173
curl --location --request POST 'https://<URI>/api/entitlements/v2/groups/service.search.user@<data-partition-id>.dataservices.energy/members' \
@@ -161,11 +179,11 @@ Run the below curl command in Azure Cloud Bash to add user(s) to an entitlement
161179
"role": "MEMBER"
162180
}'
163181
```
164-
The value to be sent for the param **"email"** is the **Object_ID (OID)** of the user and not the user's email
182+
165183

166184
**Sample request**
167185

168-
Consider an Azure Data Manager for Energy instance named "medstest" with a data partition named "dp1"
186+
Consider an Azure Data Manager for Energy instance named "medstest" with a data partition named "dp1".
169187

170188
```bash
171189
curl --location --request POST 'https://medstest.energy.azure.com/api/entitlements/v2/groups/[email protected]/members' \
@@ -187,9 +205,9 @@ Consider an Azure Data Manager for Energy instance named "medstest" with a data
187205
}
188206
```
189207

190-
### Get entitlements groups for a given user
208+
## Get entitlements groups for a given user
191209

192-
Run the below curl command in Azure Cloud Bash to get all the groups associated with the user.
210+
1. Run the below curl command in Azure Cloud Bash to get all the groups associated with the user.
193211

194212
```bash
195213
curl --location --request GET 'https://<URI>/api/entitlements/v2/members/<OBJECT_ID>/groups?type=none' \
@@ -227,11 +245,10 @@ Consider an Azure Data Manager for Energy instance named "medstest" with a data
227245
}
228246
```
229247

230-
### Delete entitlement groups of a given user
231-
232-
Run the below curl command in Azure Cloud Bash to delete a given user to your Azure Data Manager for Energy instance data partition.
248+
## Delete entitlement groups of a given user
233249

234-
As stated above, **DO NOT** delete the OWNER of a group unless you have another OWNER that can manage users in that group.
250+
1. Run the below curl command in Azure Cloud Bash to delete a given user from a given data partition.
251+
2. As stated above, **DO NOT** delete the OWNER of a group unless you have another OWNER who can manage users in that group.
235252

236253
```bash
237254
curl --location --request DELETE 'https://<URI>/api/entitlements/v2/members/<OBJECT_ID>' \
@@ -256,7 +273,7 @@ No output for a successful response
256273

257274
## Next steps
258275
<!-- Add a context sentence for the following links -->
259-
Create a legal tag for your Azure Data Manager for Energy instance's data partition.
276+
Create a legal tag for your data partition.
260277
> [!div class="nextstepaction"]
261278
> [How to manage legal tags](how-to-manage-legal-tags.md)
262279
44 KB
Loading

0 commit comments

Comments
 (0)