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: articles/energy-data-services/how-to-generate-auth-token.md
+15-7Lines changed: 15 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,6 @@ In this article, you learn how to generate the service principal auth token, a u
21
21
22
22
:::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.":::
23
23
24
-
1. Fetch the `redirect-uri` (or reply URL) for your app to receive responses from Microsoft Entra ID.
25
24
26
25
## Fetch parameters
27
26
@@ -66,15 +65,24 @@ A `client-secret` is a string value your app can use in place of a certificate t
66
65
67
66
:::image type="content" source="media/how-to-generate-auth-token/client-secret.png" alt-text="Screenshot that shows finding the client secret.":::
68
67
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
70
78
71
79
1. Create an [Azure Data Manager for Energy instance](quickstart-create-microsoft-energy-data-services-instance.md).
72
80
1. Go to your Azure Data Manager for Energy **Overview** page on the Azure portal.
73
81
1. On the **Essentials** pane, copy the URI.
74
82
75
83
:::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.":::
76
84
77
-
####Find data-partition-id
85
+
### Find data-partition-id
78
86
79
87
You have two ways to get the list of data partitions in your Azure Data Manager for Energy instance.
80
88
@@ -119,7 +127,7 @@ curl --location --request POST 'https://login.microsoftonline.com/<tenant-id>/oa
119
127
120
128
Generating a user's auth token is a two-step process.
121
129
122
-
### Get the authorizationcode
130
+
### Get the authorization-code
123
131
124
132
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.
125
133
@@ -131,7 +139,7 @@ The first step to get an access token for many OpenID Connect (OIDC) and OAuth 2
131
139
132
140
1. The browser redirects to `http://localhost:8080/?code={authorization code}&state=...` upon successful authentication.
133
141
1. Copy the response from the URL bar of the browser and fetch the text between `code=` and `&state`.
134
-
1. Keep this authorizationcode handy for future use.
142
+
1. Keep this `authorization-code` handy for future use.
135
143
136
144
#### Request format
137
145
@@ -180,8 +188,8 @@ The second step is to get the auth token and the refresh token. Your app uses th
180
188
```bash
181
189
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'client_id={client-id}
Copy file name to clipboardExpand all lines: articles/energy-data-services/how-to-manage-users.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ The object ID (OID) is the Microsoft Entra user OID.
50
50
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.
51
51
52
52
```bash
53
-
curl --location --request GET "https://<URI>/api/entitlements/v2/groups/" \
53
+
curl --location --request GET "https://<adme-url>/api/entitlements/v2/groups/" \
54
54
--header 'data-partition-id: <data-partition>' \
55
55
--header 'Authorization: Bearer <access_token>'
56
56
```
@@ -61,7 +61,7 @@ Run the following curl command in Azure Cloud Shell to get all the groups that a
61
61
1. The value to be sent for the parameter `email` is the OID of the user and not the user's email address.
62
62
63
63
```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' \
0 commit comments