Skip to content

Commit 757f19b

Browse files
committed
fixing validation error
1 parent 74d2beb commit 757f19b

1 file changed

Lines changed: 106 additions & 106 deletions

File tree

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

Lines changed: 106 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Manage users in Microsoft Azure Data Manager for Energy
2+
title: Manage users in Azure Data Manager for Energy
33
description: This article describes how to manage users in Azure Data Manager for Energy.
44
author: shikhagarg1
55
ms.author: shikhagarg
@@ -9,7 +9,7 @@ ms.date: 08/19/2022
99
ms.custom: template-how-to
1010
---
1111

12-
# Manage users
12+
# Manage users in Azure Data Manager for Energy
1313

1414
In this article, you 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).
1515

@@ -34,14 +34,14 @@ The object ID (OID) is the Microsoft Entra user OID.
3434
## First-time addition of users in a new data partition
3535

3636
1. To add the first admin to a new data partition of an Azure Data Manager for Energy instance, use the access token of the OID that was used to provision the instance.
37-
1. Get the `client-id` access token by using [Generate client-id access token](how-to-generate-auth-token.md#generate-client-id-auth-token).
37+
1. Get the `client-id` access token by using [Generate client-id access token](how-to-generate-auth-token.md#generate-the-client-id-auth-token).
3838

3939
If you try to directly use your own access token for adding entitlements, it results in a 401 error. The `client-id` access token must be used to add the first set of users in the system. Those users (with admin access) can then manage more users with their own access token.
4040
1. Use the `client-id` access token to do the following steps by using the commands outlined in the following sections:
4141
1. Add the user to the `users@<data-partition-id>.<domain>` OSDU group.
4242
2. Add the user to the `users.datalake.ops@<data-partition-id>.<domain>` OSDU group.
4343
1. The user becomes the admin of the data partition. The admin can then add or remove more users to the required entitlement groups:
44-
1. Get the admin's auth token by using [Generate user access token](how-to-generate-auth-token.md#generate-user-auth-token) and by using the same `client-id` and `client-secret` values.
44+
1. Get the admin's auth token by using [Generate user access token](how-to-generate-auth-token.md#generate-the-user-auth-token) and by using the same `client-id` and `client-secret` values.
4545
1. Get the OSDU group, such as `service.legal.editor@<data-partition-id>.<domain>`, to which you want to add more users by using the admin's access token.
4646
1. Add more users to that OSDU group by using the admin's access token.
4747

@@ -60,53 +60,53 @@ Run the following curl command in Azure Cloud Bash to get all the groups that ar
6060
1. Run the following curl command in Azure Cloud Bash to add the users to the users group by using the entitlement service.
6161
1. The value to be sent for the parameter `email` is the OID of the user and not the user's email address.
6262

63-
```bash
64-
curl --location --request POST 'https://<URI>/api/entitlements/v2/groups/<group-name>@<data-partition-id>.dataservices.energy/members' \
65-
--header 'data-partition-id: <data-partition-id>' \
66-
--header 'Authorization: Bearer <access_token>' \
67-
--header 'Content-Type: application/json' \
68-
--data-raw '{
69-
"email": "<Object_ID>",
70-
"role": "MEMBER"
71-
}'
72-
```
73-
74-
**Sample request for users OSDU group**
75-
76-
Consider an Azure Data Manager for Energy instance named `medstest` with a data partition named `dp1`.
77-
78-
```bash
79-
curl --location --request POST 'https://medstest.energy.azure.com/api/entitlements/v2/groups/[email protected]/members' \
80-
--header 'data-partition-id: medstest-dp1' \
81-
--header 'Authorization: Bearer abcdefgh123456.............' \
82-
--header 'Content-Type: application/json' \
83-
--data-raw '{
84-
"email": "90e0d063-2f8e-4244-860a-XXXXXXXXXX",
85-
"role": "MEMBER"
86-
}'
87-
```
88-
89-
**Sample response**
90-
91-
```JSON
92-
{
93-
"email": "90e0d063-2f8e-4244-860a-XXXXXXXXXX",
94-
"role": "MEMBER"
95-
}
96-
```
97-
98-
**Sample request for legal service editor OSDU group**
99-
100-
```bash
101-
curl --location --request POST 'https://medstest.energy.azure.com/api/entitlements/v2/groups/[email protected]/members' \
102-
--header 'data-partition-id: medstest-dp1' \
103-
--header 'Authorization: Bearer abcdefgh123456.............' \
104-
--header 'Content-Type: application/json' \
105-
--data-raw '{
106-
"email": "90e0d063-2f8e-4244-860a-XXXXXXXXXX",
107-
"role": "MEMBER"
108-
}'
109-
```
63+
```bash
64+
curl --location --request POST 'https://<URI>/api/entitlements/v2/groups/<group-name>@<data-partition-id>.dataservices.energy/members' \
65+
--header 'data-partition-id: <data-partition-id>' \
66+
--header 'Authorization: Bearer <access_token>' \
67+
--header 'Content-Type: application/json' \
68+
--data-raw '{
69+
"email": "<Object_ID>",
70+
"role": "MEMBER"
71+
}'
72+
```
73+
74+
**Sample request for users OSDU group**
75+
76+
Consider an Azure Data Manager for Energy instance named `medstest` with a data partition named `dp1`.
77+
78+
```bash
79+
curl --location --request POST 'https://medstest.energy.azure.com/api/entitlements/v2/groups/[email protected]/members' \
80+
--header 'data-partition-id: medstest-dp1' \
81+
--header 'Authorization: Bearer abcdefgh123456.............' \
82+
--header 'Content-Type: application/json' \
83+
--data-raw '{
84+
"email": "90e0d063-2f8e-4244-860a-XXXXXXXXXX",
85+
"role": "MEMBER"
86+
}'
87+
```
88+
89+
**Sample response**
90+
91+
```JSON
92+
{
93+
"email": "90e0d063-2f8e-4244-860a-XXXXXXXXXX",
94+
"role": "MEMBER"
95+
}
96+
```
97+
98+
**Sample request for legal service editor OSDU group**
99+
100+
```bash
101+
curl --location --request POST 'https://medstest.energy.azure.com/api/entitlements/v2/groups/[email protected]/members' \
102+
--header 'data-partition-id: medstest-dp1' \
103+
--header 'Authorization: Bearer abcdefgh123456.............' \
104+
--header 'Content-Type: application/json' \
105+
--data-raw '{
106+
"email": "90e0d063-2f8e-4244-860a-XXXXXXXXXX",
107+
"role": "MEMBER"
108+
}'
109+
```
110110

111111
> [!IMPORTANT]
112112
> The app ID is the default OWNER of all the groups.
@@ -116,68 +116,68 @@ Consider an Azure Data Manager for Energy instance named `medstest` with a data
116116

117117
1. Run the following curl command in Azure Cloud Bash to get all the groups associated with the user.
118118

119-
```bash
120-
curl --location --request GET 'https://<URI>/api/entitlements/v2/members/<OBJECT_ID>/groups?type=none' \
121-
--header 'data-partition-id: <data-partition-id>' \
122-
--header 'Authorization: Bearer <access_token>'
123-
```
124-
125-
**Sample request**
126-
127-
Consider an Azure Data Manager for Energy instance named `medstest` with a data partition named `dp1`.
128-
129-
```bash
130-
curl --location --request GET 'https://medstest.energy.azure.com/api/entitlements/v2/members/90e0d063-2f8e-4244-860a-XXXXXXXXXX/groups?type=none' \
131-
--header 'data-partition-id: medstest-dp1' \
132-
--header 'Authorization: Bearer abcdefgh123456.............'
133-
```
134-
135-
**Sample response**
136-
137-
```JSON
138-
{
139-
"desId": "90e0d063-2f8e-4244-860a-XXXXXXXXXX",
140-
"memberEmail": "90e0d063-2f8e-4244-860a-XXXXXXXXXX",
141-
"groups": [
142-
{
143-
"name": "users",
144-
"description": "Datalake users",
145-
"email": "[email protected]"
146-
},
119+
```bash
120+
curl --location --request GET 'https://<URI>/api/entitlements/v2/members/<OBJECT_ID>/groups?type=none' \
121+
--header 'data-partition-id: <data-partition-id>' \
122+
--header 'Authorization: Bearer <access_token>'
123+
```
124+
125+
**Sample request**
126+
127+
Consider an Azure Data Manager for Energy instance named `medstest` with a data partition named `dp1`.
128+
129+
```bash
130+
curl --location --request GET 'https://medstest.energy.azure.com/api/entitlements/v2/members/90e0d063-2f8e-4244-860a-XXXXXXXXXX/groups?type=none' \
131+
--header 'data-partition-id: medstest-dp1' \
132+
--header 'Authorization: Bearer abcdefgh123456.............'
133+
```
134+
135+
**Sample response**
136+
137+
```JSON
147138
{
148-
"name": "service.search.user",
149-
"description": "Datalake Search users",
150-
"email": "[email protected]"
139+
"desId": "90e0d063-2f8e-4244-860a-XXXXXXXXXX",
140+
"memberEmail": "90e0d063-2f8e-4244-860a-XXXXXXXXXX",
141+
"groups": [
142+
{
143+
"name": "users",
144+
"description": "Datalake users",
145+
"email": "[email protected]"
146+
},
147+
{
148+
"name": "service.search.user",
149+
"description": "Datalake Search users",
150+
"email": "[email protected]"
151+
}
152+
]
151153
}
152-
]
153-
}
154-
```
154+
```
155155

156156
## Delete OSDU groups of a specific user in a data partition
157157

158158
1. Run the following curl command in Azure Cloud Bash to delete a specific user from a specific data partition.
159159
1. *Do not* delete the OWNER of a group unless you have another OWNER who can manage users in that group.
160-
161-
```bash
162-
curl --location --request DELETE 'https://<URI>/api/entitlements/v2/members/<OBJECT_ID>' \
163-
--header 'data-partition-id: <data-partition-id>' \
164-
--header 'Authorization: Bearer <access_token>'
165-
```
166-
167-
**Sample request**
168-
169-
Consider an Azure Data Manager for Energy instance named `medstest` with a data partition named `dp1`.
170-
171-
```bash
172-
curl --location --request DELETE 'https://medstest.energy.azure.com/api/entitlements/v2/members/90e0d063-2f8e-4244-860a-XXXXXXXXXX' \
173-
--header 'data-partition-id: medstest-dp1' \
174-
--header 'Authorization: Bearer abcdefgh123456.............'
175-
```
176-
177-
**Sample response**
178-
179-
No output for a successful response.
180-
160+
161+
```bash
162+
curl --location --request DELETE 'https://<URI>/api/entitlements/v2/members/<OBJECT_ID>' \
163+
--header 'data-partition-id: <data-partition-id>' \
164+
--header 'Authorization: Bearer <access_token>'
165+
```
166+
167+
**Sample request**
168+
169+
Consider an Azure Data Manager for Energy instance named `medstest` with a data partition named `dp1`.
170+
171+
```bash
172+
curl --location --request DELETE 'https://medstest.energy.azure.com/api/entitlements/v2/members/90e0d063-2f8e-4244-860a-XXXXXXXXXX' \
173+
--header 'data-partition-id: medstest-dp1' \
174+
--header 'Authorization: Bearer abcdefgh123456.............'
175+
```
176+
177+
**Sample response**
178+
179+
No output for a successful response.
180+
181181
## Next steps
182182

183183
After you add users to the groups, you can:

0 commit comments

Comments
 (0)