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
#Customer intent: As an administrator, I am trying to learn how to use the Request Service API and integrate it into my business application
14
+
#Customer intent: As an administrator, I am trying to learn how to use the Request Service API and integrate it into my business application.
15
15
---
16
16
17
17
# Request Service REST API (preview)
18
18
19
-
Azure Active Directory verifiable credentials Request Service REST APIallows you to issue and verify verifiable credentials using the Azure AD Verifiable Credentials Service. This article shows you how to start using the Request Service REST API.
19
+
Azure Active Directory (Azure AD) Verifiable Credentials includes the Request Service REST API. This API allows you to issue and verify credentials. This article shows you how to start using the Request Service REST API.
20
20
21
21
> [!IMPORTANT]
22
-
> The Request Service REST API is currently in public preview (beta).
23
-
> This preview version is provided without a service level agreement, you can expect breaking changes and deprecation of the API while in preview version from time to time. The API is not recommended for production workloads while in preview.
24
-
> For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
25
-
22
+
> The Request Service REST API is currently in preview. This preview version is provided without a service level agreement, and you can occasionally expect breaking changes and deprecation of the API while in preview. The preview version of the API isn't recommended for production workloads. For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
26
23
27
24
## API access token
28
25
29
-
For your application to access the Request Service REST API, you need to include a valid access token with the required permissions. Access tokens issued by the Microsoft identity platform contain information (scopes) that the Request Service REST API uses to validate the caller. Ensuring that the caller has the proper permissions to perform the operation they're requesting.
26
+
For your application to access the Request Service REST API, you need to include a valid access token with the required permissions. Access tokens issued by the Microsoft identity platform contain information (scopes) that the Request Service REST API uses to validate the caller. An access token ensures that the caller has the proper permissions to perform the operation they're requesting.
30
27
31
-
To get an access token, your app must be registered with the Microsoft identity platform and be authorized by an administrator for access to the Request Service API. If you haven't register the *verifiable-credentials-app* application, follow the steps [how to register the app](verifiable-credentials-configure-tenant.md#step-3-register-an-application-in-azure-ad) and then [generate an application secret](verifiable-credentials-configure-issuer.md#configure-the-verifiable-credentials-app).
28
+
To get an access token, your app must be registered with the Microsoft identity platform, and be authorized by an administrator for access to the Request Service REST API. If you haven't registered the *verifiable-credentials-app* application, see [how to register the app](verifiable-credentials-configure-tenant.md#register-an-application-in-azure-ad) and then [generate an application secret](verifiable-credentials-configure-issuer.md#configure-the-verifiable-credentials-app).
32
29
33
30
### Get an access token
34
31
35
-
Use the [OAuth 2.0 client credentials grant flow](../../active-directory/develop/v2-oauth2-client-creds-grant-flow.md) to acquire the access token using the of the Microsoft identity platform. We recommend that you use a trusted oauth library. In this tutorial, we use the Microsoft Authentication Library [MSAL](../../active-directory/develop/msal-overview.md). MSAL is a Microsoft provided library that simplifies adding authentication and authorization to your app that can call a secure web API.
32
+
Use the [OAuth 2.0 client credentials grant flow](../../active-directory/develop/v2-oauth2-client-creds-grant-flow.md) to acquire the access token by using the Microsoft identity platform. Use a trusted library for this purpose. In this tutorial, we use the Microsoft Authentication Library [MSAL](../../active-directory/develop/msal-overview.md). MSAL simplifies adding authentication and authorization to an app that can call a secure web API.
36
33
37
34
# [HTTP](#tab/http)
38
35
39
36
```http
40
-
Pleaes refer to to the Microsoft Authentication Library (MSAL) documentation for more information on how to acquire tokens via HTTP.
37
+
Refer to to the Microsoft Authentication Library (MSAL) documentation for more information on how to acquire tokens via HTTP.
41
38
```
42
39
43
40
# [C#](#tab/csharp)
@@ -91,19 +88,18 @@ const result = await mainApp.msalCca.acquireTokenByClientCredential(mainApp.msal
91
88
92
89
---
93
90
94
-
In the code above provide the following parameters.
91
+
In the preceding code, provide the following parameters:
95
92
96
93
| Parameter | Condition | Description |
97
94
| --- | --- | --- |
98
-
| Authority | Required | The directory tenant the application plans to operate against. For example,`https://login.microsoftonline.com/{your-tenant}`, replace`your-tenant` with your [tenant ID or name](../fundamentals/active-directory-how-to-find-tenant.md). |
99
-
| Client ID | Required | The application ID that's assigned to your app. You can find this information in Azure portal where you registered your app. |
95
+
| Authority | Required | The directory tenant the application plans to operate against. For example:`https://login.microsoftonline.com/{your-tenant}`. (Replace`your-tenant` with your [tenant ID or name](../fundamentals/active-directory-how-to-find-tenant.md).)|
96
+
| Client ID | Required | The application ID that's assigned to your app. You can find this information in the Azure portal, where you registered your app. |
100
97
| Client secret | Required | The client secret that you generated for your app.|
101
98
| Scopes | Required | Must be set to `bbb94529-53a3-4be5-a069-7eaf2712b826/.default`. |
102
99
100
+
For more information about how to get an access token by using a console app's identity, see one of the following articles: [C#](../develop/quickstart-v2-netcore-daemon.md), [Python](../develop/quickstart-v2-python-daemon.md), [Node.js](../develop/quickstart-v2-nodejs-console.md), or [Java](../develop/quickstart-v2-java-daemon.md).
103
101
104
-
For more information how to get an access token by using a console app's identity, see one of the following articles [C#](../develop/quickstart-v2-netcore-daemon.md), [Python](../develop/quickstart-v2-python-daemon.md) ,[Node.js](../develop/quickstart-v2-nodejs-console.md), or [Java](../develop/quickstart-v2-java-daemon.md).
105
-
106
-
You can also [Access token request with a certificate](../develop/v2-oauth2-client-creds-grant-flow.md) instead of client secret.
102
+
You can also [access a token request with a certificate](../develop/v2-oauth2-client-creds-grant-flow.md) instead of client secret.
107
103
108
104
# [HTTP](#tab/http)
109
105
@@ -176,29 +172,29 @@ const result = await mainApp.msalCca.acquireTokenByClientCredential(mainApp.msal
176
172
177
173
## Call the API
178
174
179
-
To issue, or verify a verifiable credential, follow these steps:
175
+
To issue or verify a verifiable credential, follow these steps:
180
176
181
-
1. Construct an HTTP POST request to the Request Service REST API. Replace the `{tenantID}` with your **tenant ID**, or your tenant name.
177
+
1. Construct an HTTP POST request to the Request Service REST API. Replace the `{tenantID}` with your tenant ID, or your tenant name.
182
178
183
179
```http
184
180
POST https://beta.did.msidentity.com/v1.0/{tenantID}/verifiablecredentials/request
185
181
```
186
182
187
-
1. Attach the access token as a Bearer token to the Authorization header in an HTTP request.
183
+
1. Attach the access token as a bearer token to the authorization header in an HTTP request.
188
184
189
185
```http
190
186
Authorization: Bearer <token>
191
187
```
192
188
193
189
1. Set the `Content-Type` header to `Application/json`.
194
190
195
-
1. Prepare and attach the [Issuance](issuance-request-api.md#issuance-request-payload), or [Presentation](presentation-request-api.md#presentation-request-payload) request payload to the request body.
191
+
1. Prepare and attach the [issuance](issuance-request-api.md#issuance-request-payload) or [presentation](presentation-request-api.md#presentation-request-payload) request payload to the request body.
196
192
197
193
1. Submit the request to the Request Service REST API.
198
194
199
195
## Issuance request example
200
196
201
-
The following example demonstrates a verifiable credentials issuance request. For information about the payload, see [Request Service REST API issuance specification](issuance-request-api.md)
197
+
The following example demonstrates a verifiable credentials issuance request. For information about the payload, see [Request Service REST API issuance specification](issuance-request-api.md).
202
198
203
199
```http
204
200
POST https://beta.did.msidentity.com/v1.0/contoso.onmicrosoft.com/verifiablecredentials/request
For the complete code, check out one of the following code samples, [C#](https://github.com/Azure-Samples/active-directory-verifiable-credentials-dotnet/blob/main/AspNetCoreVerifiableCredentials/IssuerController.cs) and [Node.js](https://github.com/Azure-Samples/active-directory-verifiable-credentials-node/blob/main/1-node-api-idtokenhint/issuer.js).
232
+
For the complete code, see one of the following code samples:
The following example demonstrates a verifiable credentials presentation request. For information about the payload, see [Request Service REST API presentation specification](presentation-request-api.md)
239
+
The following example demonstrates a verifiable credentials presentation request. For information about the payload, see [Request Service REST API presentation specification](presentation-request-api.md).
241
240
242
241
```http
243
242
POST https://beta.did.msidentity.com/v1.0/contoso.onmicrosoft.com/verifiablecredentials/request
The request payload contains the [issuance](issuance-request-api.md#callback-events) and [presentation](presentation-request-api.md#callback-events) callback endpoint. The endpoint is part of your web application and should be publicly available. Azure AD verifiable credentials service calls your endpoint to inform your app on certain events. For example, when a user scans the QR code, uses the deep link their authenticator app, or finishes the presentation process.
281
+
The request payload contains the [issuance](issuance-request-api.md#callback-events) and [presentation](presentation-request-api.md#callback-events) callback endpoint. The endpoint is part of your web application, and should be publicly available. Azure AD Verifiable Credentials calls your endpoint to inform your app on certain events. For example, such events might be when a user scans the QR code, uses the deep link the authenticator app, or finishes the presentation process.
283
282
284
283
The following diagram describes the call your app makes to the Request Service REST API, and the callbacks to your application.
285
284
286
-

285
+

287
286
288
-
Configure your endpoint to listen to incoming HTTP POST requests. The following code snippet demonstrates how to handle the issuance callback HTTP request and update the UI accordantly:
287
+
Configure your endpoint to listen to incoming HTTP POST requests. The following code snippet demonstrates how to handle the issuance callback HTTP request, and how to update the UI accordingly:
289
288
290
289
# [HTTP](#tab/http)
291
290
292
-
Not applicable. Choose one of the programming languages above.
291
+
Not applicable. Choose one of the other programming languages.
293
292
294
293
# [C#](#tab/csharp)
295
294
@@ -357,7 +356,7 @@ For the complete code, see the [issuance](https://github.com/Azure-Samples/activ
0 commit comments