Skip to content

Commit 7d73b1c

Browse files
committed
acrolinx and formatting fixes
1 parent c1c94b7 commit 7d73b1c

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

powerapps-docs/developer/common-data-service/webapi/quick-start-blazor-server-app.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Quick Start: Web API sample (C#) (Common Data Service)| Microsoft Docs"
2+
title: "Quickstart: Web API sample (C#) (Common Data Service)| Microsoft Docs"
33
description: "This sample demonstrates how to authenticate with a Common Data Service Server and then call a basic Web API operation, the WhoAmI Function"
44
ms.custom: ""
55
ms.date: 06/23/2020
@@ -15,31 +15,31 @@ search.app:
1515
- PowerApps
1616
- D365CE
1717
---
18-
# Quick Start: Blazor Server Web API sample (C#)
18+
# Quickstart: Blazor Server Web API sample (C#)
1919

20-
In this quick start you will create a simple Blazor Server application to connect to your Common Data Service environment using the Web API.
20+
In this quickstart, you'll create a Blazor Server application to connect to your Common Data Service environment using the Web API.
2121

22-
You will authenticate and use an <xref:System.Net.Http.HttpClient> to send a `GET` request to the <xref href="Microsoft.Dynamics.CRM.WhoAmI?text=WhoAmI Function" /> the response will be a <xref href="Microsoft.Dynamics.CRM.WhoAmIResponse?text=WhoAmIResponse ComplexType" />. You will display the `UserId` property value.
22+
You'll authenticate and use an <xref:System.Net.Http.HttpClient> to send a `GET` request to the <xref href="Microsoft.Dynamics.CRM.WhoAmI?text=WhoAmI Function" /> the response will be a <xref href="Microsoft.Dynamics.CRM.WhoAmIResponse?text=WhoAmIResponse ComplexType" />. You will display the `UserId` property value.
2323

2424
> [!NOTE]
25-
> This is a very simple example to show how to get connected with a minimum of code. The following [Enhanced quick start](enhanced-quick-start.md) will build upon this sample to apply better design patterns.
25+
> This is a very simple example to show how to get connected with a minimum of code. The following [Enhanced quickstart](enhanced-quick-start.md) will build upon this sample to apply better design patterns.
2626
2727
## Prerequisites
2828

2929
- Visual Studio (2019 16.6.2 recommended)
30-
- Familiarity with the Azure Portal
30+
- Familiarity with the Azure portal
3131
- Internet connection
3232
- Valid user account for a Common Data Service instance
3333
- Admin access to grant application registrations
3434
- URL to the Common Data Service environment you want to connect with
3535
- Basic understanding of the Visual C# language
3636

3737
> [!NOTE]
38-
> To authenticate you must have an app registered in Azure Active Directory. The registration will happen automatically as part of the template creation, but will require additional updates in the Azure Portal.
38+
> To authenticate you must have an app registered in Azure Active Directory. The registration will happen automatically as part of the template creation, but will require additional updates in the Azure portal.
3939
4040
## Create Visual Studio project
4141

42-
1. Create a new Blazor Server App using **.NET Core 3.1** - do _not_ click "Create" yet
42+
1. Create a new Blazor Server App using **.NET Core 3.1** - _don't_ click "Create" yet
4343

4444
![Start a Blazor Server project](../media/quick-start-blazor-server-app-csharp-1.png)
4545

@@ -51,11 +51,11 @@ You will authenticate and use an <xref:System.Net.Http.HttpClient> to send a `GE
5151

5252
## Configure the Application in Active Directory
5353

54-
By default, the template will create a registered application. To connect to Common Data Services requires additional permissions. Open the Azure Portal and log in with your credentials. Navigate to "Active Directory" and "App Registrations" and choose the entry with the same name as your application.
54+
By default, the template will create a registered application. Connecting to Common Data Services will require additional permissions. Open the Azure portal and log in with your credentials. Navigate to "Active Directory" and "App Registrations" and choose the entry with the same name as your application.
5555

5656
1. Choose "Authentication" and check "Access tokens" under "Implicit grant" then click "Save".
5757

58-
![Implicit grant](..media/quick-start-blazor-server-app-csharp-3.png)
58+
![Implicit grant](../media/quick-start-blazor-server-app-csharp-3.png)
5959

6060
1. Choose "Certificates & secrets" and click "New client secret"
6161

@@ -127,10 +127,10 @@ The application requires some extra steps to capture the authentication token an
127127

128128
1. Open `Pages/_Host.cshtml` and add the following using statements after the namespace declaration:
129129

130-
```razor
131-
@using BlazorCommonDataService.Data
132-
@using Microsoft.AspNetCore.Authentication
133-
```
130+
```razor
131+
@using BlazorCommonDataService.Data
132+
@using Microsoft.AspNetCore.Authentication
133+
```
134134

135135
1. After the `<body>` tag, add the following code and update the app component to acquire and pass the token:
136136

@@ -146,7 +146,7 @@ The application requires some extra steps to capture the authentication token an
146146
</app>
147147
```
148148

149-
1. Obtain the ___domain for the Common Data Services management API. One way to do this is to open the [Power Platform admin center](https://admin.powerplatform.microsoft.com/environments), navigate to "environments" then choose "open environment." You should see a URL like: `https://{org}.crm.dynamics.com`
149+
1. Obtain the organization name for the Common Data Services management API. If you're not sure what the name is, open the [Power Platform admin center](https://admin.powerplatform.microsoft.com/environments), navigate to "environments" then choose "open environment." You will see a URL like this: `https://{org}.crm.dynamics.com`
150150

151151
1. Add an entry to `appsettings.json` named `CDSAPI` with the URL. Add `/api/data/v.9.0/` to the end, so it looks like this:
152152

@@ -257,13 +257,18 @@ Press F5 to run the program. The output should look like this:
257257

258258
**Congratulations!** You have successfully connected to the Web API.
259259

260-
The quick start sample shows a simple approach to create a Visual Studio project without any exception handling or method to refresh the access token. You can expand on the example to perform more complex operations, and wrap the `HttpClient` in a service class to handle the permissions.
260+
This quickstart sample shows a simple approach to create a Visual Studio project without any exception handling or method to refresh the access token. You can expand on the example to perform more complex operations, and wrap the `HttpClient` in a service class to handle the permissions.
261+
262+
The [Enhanced quickstart](enhanced-quick-start.md) topic shows how to:
261263

262-
The [Enhanced quick start](enhanced-quick-start.md) topic shows how to implement exception handling methods, basic authentication method using connection string, a re-usable method to refresh the access token, and introduces how to build re-usable methods to perform data operations.
264+
- implement exception handling methods
265+
- basic authentication method using a connection string
266+
- create a reusable method to refresh the access token
267+
- build reusable methods for data operations
263268

264269
## Next steps
265270

266271
Learn how to structure your code for a better design.
267272

268273
> [!div class="nextstepaction"]
269-
> [Enhanced quick start](enhanced-quick-start.md)<br/>
274+
> [Enhanced quickstart](enhanced-quick-start.md)<br/>

0 commit comments

Comments
 (0)