Skip to content

Commit 5bf5e38

Browse files
authored
Merge pull request #177670 from Ja-Dunn/seven-verifiable-credentials-articles
edit pass: seven verifiable-credentials articles
2 parents 08a3b51 + 7fc32b1 commit 5bf5e38

7 files changed

+368
-402
lines changed

articles/active-directory/verifiable-credentials/get-started-request-api.md

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: How to call the Request Service REST API (preview)
33
titleSuffix: Azure Active Directory Verifiable Credentials
4-
description: Learn how to issue and verify using the Request Service REST API
4+
description: Learn how to issue and verify by using the Request Service REST API
55
documentationCenter: ''
66
author: barclayn
77
manager: karenh444
@@ -11,33 +11,30 @@ ms.subservice: verifiable-credentials
1111
ms.date: 10/08/2021
1212
ms.author: barclayn
1313

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
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.
1515
---
1616

1717
# Request Service REST API (preview)
1818

19-
Azure Active Directory verifiable credentials Request Service REST API allows 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.
2020

2121
> [!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/).
2623
2724
## API access token
2825

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.
3027

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).
3229

3330
### Get an access token
3431

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.
3633

3734
# [HTTP](#tab/http)
3835

3936
```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.
4138
```
4239

4340
# [C#](#tab/csharp)
@@ -91,19 +88,18 @@ const result = await mainApp.msalCca.acquireTokenByClientCredential(mainApp.msal
9188

9289
---
9390

94-
In the code above provide the following parameters.
91+
In the preceding code, provide the following parameters:
9592

9693
| Parameter | Condition | Description |
9794
| --- | --- | --- |
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. |
10097
| Client secret | Required | The client secret that you generated for your app.|
10198
| Scopes | Required | Must be set to `bbb94529-53a3-4be5-a069-7eaf2712b826/.default`. |
10299

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).
103101

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.
107103

108104
# [HTTP](#tab/http)
109105

@@ -176,29 +172,29 @@ const result = await mainApp.msalCca.acquireTokenByClientCredential(mainApp.msal
176172

177173
## Call the API
178174

179-
To issue, or verify a verifiable credential, follow these steps:
175+
To issue or verify a verifiable credential, follow these steps:
180176

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.
182178

183179
```http
184180
POST https://beta.did.msidentity.com/v1.0/{tenantID}/verifiablecredentials/request
185181
```
186182
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.
188184
189185
```http
190186
Authorization: Bearer <token>
191187
```
192188
193189
1. Set the `Content-Type` header to `Application/json`.
194190
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.
196192
197193
1. Submit the request to the Request Service REST API.
198194
199195
## Issuance request example
200196
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).
202198
203199
```http
204200
POST https://beta.did.msidentity.com/v1.0/contoso.onmicrosoft.com/verifiablecredentials/request
@@ -233,11 +229,14 @@ Authorization: Bearer <token>
233229
}
234230
```
235231

236-
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:
233+
234+
- [C#](https://github.com/Azure-Samples/active-directory-verifiable-credentials-dotnet/blob/main/AspNetCoreVerifiableCredentials/IssuerController.cs)
235+
- [Node.js](https://github.com/Azure-Samples/active-directory-verifiable-credentials-node/blob/main/1-node-api-idtokenhint/issuer.js)
237236

238237
## Presentation request example
239238

240-
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).
241240

242241
```http
243242
POST https://beta.did.msidentity.com/v1.0/contoso.onmicrosoft.com/verifiablecredentials/request
@@ -272,24 +271,24 @@ Authorization: Bearer <token>
272271
}
273272
```
274273

275-
For the complete code, check out one of the following code samples:
274+
For the complete code, see one of the following code samples:
276275

277276
- [C#](https://github.com/Azure-Samples/active-directory-verifiable-credentials-dotnet/blob/main/1-asp-net-core-api-idtokenhint/VerifierController.cs)
278-
- [Node.js](https://github.com/Azure-Samples/active-directory-verifiable-credentials-node/blob/main/1-node-api-idtokenhint/verifier.js).
277+
- [Node.js](https://github.com/Azure-Samples/active-directory-verifiable-credentials-node/blob/main/1-node-api-idtokenhint/verifier.js)
279278

280279
## Callback events
281280

282-
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.
283282

284283
The following diagram describes the call your app makes to the Request Service REST API, and the callbacks to your application.
285284

286-
![Diagram describes the call to the API and the callback events.](media/get-started-request-api/callback-events.png)
285+
![Diagram that describes the call to the API and the callback events.](media/get-started-request-api/callback-events.png)
287286

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:
289288

290289
# [HTTP](#tab/http)
291290

292-
Not applicable. Choose one of the programming languages above.
291+
Not applicable. Choose one of the other programming languages.
293292

294293
# [C#](#tab/csharp)
295294

@@ -357,7 +356,7 @@ For the complete code, see the [issuance](https://github.com/Azure-Samples/activ
357356

358357
## Next steps
359358

360-
Check out the following articles:
359+
Learn more about these specifications:
361360

362361
- [Issuance API specification](issuance-request-api.md)
363362
- [Presentation API specification](presentation-request-api.md)

0 commit comments

Comments
 (0)