Skip to content

Commit 0eed899

Browse files
authored
Merge pull request #263457 from shikhagarg1/main
clear differentiation bw redirect uri and adme url
2 parents 0b2855f + 18c12ce commit 0eed899

File tree

4 files changed

+23
-15
lines changed

4 files changed

+23
-15
lines changed

articles/energy-data-services/how-to-generate-auth-token.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ In this article, you learn how to generate the service principal auth token, a u
2121

2222
:::image type="content" source="media/how-to-generate-auth-token/app-registration-uri.png" alt-text="Screenshot that shows adding the URI to the app.":::
2323

24-
1. Fetch the `redirect-uri` (or reply URL) for your app to receive responses from Microsoft Entra ID.
2524

2625
## Fetch parameters
2726

@@ -66,15 +65,24 @@ A `client-secret` is a string value your app can use in place of a certificate t
6665
6766
:::image type="content" source="media/how-to-generate-auth-token/client-secret.png" alt-text="Screenshot that shows finding the client secret.":::
6867

69-
#### Find the URL for your Azure Data Manager for Energy instance
68+
### Find redirect-uri
69+
The `redirect-uri` of your app, where your app sends and receives the authentication responses. It must exactly match one of the redirect URIs that you registered in the portal, except that it must be URL encoded.
70+
71+
1. Go to **App registrations**.
72+
1. Under the **Manage** section, select **Authentication**.
73+
1. Fetch the `redirect-uri` (or reply URL) for your app to receive responses from Microsoft Entra ID.
74+
75+
:::image type="content" source="media/how-to-generate-auth-token/redirect-uri.png" alt-text="Screenshot that shows redirect-uri.":::
76+
77+
### Find the adme-url for your Azure Data Manager for Energy instance
7078

7179
1. Create an [Azure Data Manager for Energy instance](quickstart-create-microsoft-energy-data-services-instance.md).
7280
1. Go to your Azure Data Manager for Energy **Overview** page on the Azure portal.
7381
1. On the **Essentials** pane, copy the URI.
7482

7583
:::image type="content" source="media/how-to-generate-auth-token/endpoint-url.png" alt-text="Screenshot that shows finding the URI for the Azure Data Manager for Energy instance.":::
7684

77-
#### Find data-partition-id
85+
### Find data-partition-id
7886

7987
You have two ways to get the list of data partitions in your Azure Data Manager for Energy instance.
8088

@@ -119,7 +127,7 @@ curl --location --request POST 'https://login.microsoftonline.com/<tenant-id>/oa
119127

120128
Generating a user's auth token is a two-step process.
121129

122-
### Get the authorization code
130+
### Get the authorization-code
123131

124132
The first step to get an access token for many OpenID Connect (OIDC) and OAuth 2.0 flows is to redirect the user to the Microsoft identity platform `/authorize` endpoint. Microsoft Entra ID signs the user in and requests their consent for the permissions your app requests. In the authorization code grant flow, after consent is obtained, Microsoft Entra ID returns an authorization code to your app that it can redeem at the Microsoft identity platform `/token` endpoint for an access token.
125133

@@ -131,7 +139,7 @@ The first step to get an access token for many OpenID Connect (OIDC) and OAuth 2
131139

132140
1. The browser redirects to `http://localhost:8080/?code={authorization code}&state=...` upon successful authentication.
133141
1. Copy the response from the URL bar of the browser and fetch the text between `code=` and `&state`.
134-
1. Keep this authorization code handy for future use.
142+
1. Keep this `authorization-code` handy for future use.
135143

136144
#### Request format
137145

@@ -180,8 +188,8 @@ The second step is to get the auth token and the refresh token. Your app uses th
180188
```bash
181189
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'client_id={client-id}
182190
&scope={client-id}%2f.default openid profile offline_access
183-
&code={authorization code}
184-
&redirect_uri=http%3A%2F%2Flocalhost%3a8080
191+
&code={authorization-code}
192+
&redirect_uri={redirect-uri}
185193
&grant_type=authorization_code
186194
&client_secret={client-secret}' 'https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token'
187195
```

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Run the following curl command in Azure Cloud Shell to create a new data group,
1919
**Request format**
2020

2121
```bash
22-
curl --location --request POST "https://<URI>/api/entitlements/v2/groups/" \
22+
curl --location --request POST "https://<adme-url>/api/entitlements/v2/groups/" \
2323
--header 'data-partition-id: <data-partition>' \
2424
--header 'Authorization: Bearer <access_token>'
2525
--data-raw '{
@@ -37,7 +37,7 @@ In case, a data record has 2 ACLs, ACL_1 and ACL_2, and a given user is member o
3737
**Request format**
3838
3939
```bash
40-
curl --location --request PUT 'https://osdu-ship.msft-osdu-test.org/api/storage/v2/records/' \
40+
curl --location --request PUT 'https://<adme-url>/api/storage/v2/records/' \
4141
--header 'data-partition-id: opendes' \
4242
--header 'Accept: application/json' \
4343
--header 'Authorization: Bearer <token>’ \
@@ -98,7 +98,7 @@ Keep the record ID from the response handy for future references.
9898
**Request format**
9999
100100
```bash
101-
curl --location 'https://osdu-ship.msft-osdu-test.org/api/storage/v2/records/opendes:master-data--Well:999736019023' \
101+
curl --location 'https://<adme-url>/api/storage/v2/records/opendes:master-data--Well:999736019023' \
102102
--header 'data-partition-id: opendes' \
103103
--header 'Authorization: Bearer <token>
104104
```
@@ -147,7 +147,7 @@ The first `/acl/owners/0` operation removes ACL from 0th position in the array o
147147
**Request format**
148148

149149
```bash
150-
curl --location --request PATCH 'https://osdu-ship.msft-osdu-test.org/api/storage/v2/records/' \
150+
curl --location --request PATCH 'https://<adme-url>/api/storage/v2/records/' \
151151
--header 'data-partition-id: opendes' \
152152
--header 'Accept: application/json' \
153153
--header 'Authorization: Bearer <token>’\

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The object ID (OID) is the Microsoft Entra user OID.
5050
Run the following curl command in Azure Cloud Shell to get all the groups that are available for you or that you have access to in the specific data partition of the Azure Data Manager for Energy instance.
5151

5252
```bash
53-
curl --location --request GET "https://<URI>/api/entitlements/v2/groups/" \
53+
curl --location --request GET "https://<adme-url>/api/entitlements/v2/groups/" \
5454
--header 'data-partition-id: <data-partition>' \
5555
--header 'Authorization: Bearer <access_token>'
5656
```
@@ -61,7 +61,7 @@ Run the following curl command in Azure Cloud Shell to get all the groups that a
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

6363
```bash
64-
curl --location --request POST 'https://<URI>/api/entitlements/v2/groups/<group-name>@<data-partition-id>.dataservices.energy/members' \
64+
curl --location --request POST 'https://<adme-url>/api/entitlements/v2/groups/<group-name>@<data-partition-id>.dataservices.energy/members' \
6565
--header 'data-partition-id: <data-partition-id>' \
6666
--header 'Authorization: Bearer <access_token>' \
6767
--header 'Content-Type: application/json' \
@@ -118,7 +118,7 @@ Run the following curl command in Azure Cloud Shell to get all the groups that a
118118
1. Run the following curl command in Azure Cloud Shell to get all the groups associated with the user.
119119

120120
```bash
121-
curl --location --request GET 'https://<URI>/api/entitlements/v2/members/<OBJECT_ID>/groups?type=none' \
121+
curl --location --request GET 'https://<adme-url>/api/entitlements/v2/members/<OBJECT_ID>/groups?type=none' \
122122
--header 'data-partition-id: <data-partition-id>' \
123123
--header 'Authorization: Bearer <access_token>'
124124
```
@@ -160,7 +160,7 @@ Run the following curl command in Azure Cloud Shell to get all the groups that a
160160
1. *Do not* delete the OWNER of a group unless you have another OWNER who can manage users in that group.
161161

162162
```bash
163-
curl --location --request DELETE 'https://<URI>/api/entitlements/v2/members/<OBJECT_ID>' \
163+
curl --location --request DELETE 'https://<adme-url>/api/entitlements/v2/members/<OBJECT_ID>' \
164164
--header 'data-partition-id: <data-partition-id>' \
165165
--header 'Authorization: Bearer <access_token>'
166166
```
61.5 KB
Loading

0 commit comments

Comments
 (0)