Skip to content

Commit 4516bb4

Browse files
committed
Merge remote-tracking branch 'origin/main' into jasongre-appHeaderColorOverride
2 parents 0ad654d + 1f08834 commit 4516bb4

File tree

5 files changed

+32
-24
lines changed

5 files changed

+32
-24
lines changed

powerapps-docs/developer/data-platform/authenticate-oauth.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Use OAuth authentication with Microsoft Dataverse (Dataverse) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
33
description: "Learn how to authenticate applications with Microsoft Dataverse using OAuth." # 115-145 characters including spaces. This abstract displays in the search result.
44
ms.custom: has-adal-ref
5-
ms.date: 09/12/2022
5+
ms.date: 10/16/2023
66
ms.reviewer: pehecke
77
ms.topic: article
88
author: ritesp # GitHub ID
@@ -16,11 +16,11 @@ contributors:
1616

1717
# Use OAuth authentication with Microsoft Dataverse
1818

19-
[OAuth 2.0](https://oauth.net/2/) is the industry-standard protocol for authorization. After application users provide credentials to authenticate, OAuth determines whether they are authorized to access the resources.
19+
[OAuth 2.0](https://oauth.net/2/) is the industry-standard protocol for authorization. After application users provide credentials to authenticate, OAuth determines whether they're authorized to access the resources.
2020

2121
Client applications must support the use of OAuth to access data using the Web API. OAuth enables two-factor authentication (2FA) or certificate-based authentication for server-to-server application scenarios.
2222

23-
OAuth requires an identity provider for authentication. For Dataverse, the identity provider is Azure Active Directory (AAD). To authenticate with AAD using a Microsoft work or school account, use the [Microsoft Authentication Library](/azure/active-directory/develop/msal-overview#languages-and-frameworks) (MSAL).
23+
OAuth requires an identity provider for authentication. For Dataverse, the identity provider is Azure Active Directory (AD). To authenticate with AD using a Microsoft work or school account, use the [Microsoft Authentication Library](/azure/active-directory/develop/msal-overview#languages-and-frameworks) (MSAL).
2424

2525
> [!NOTE]
2626
> This topic will introduce common concepts related to connecting to Dataverse using OAuth with authentication libraries. This content will focus on how a developer can connect to Dataverse but not on the inner workings of OAuth or the libraries. For complete information related to authentication see the Azure Active Directory documentation. [What is authentication?](/azure/active-directory/develop/authentication-scenarios) is a good place to start.
@@ -29,38 +29,38 @@ OAuth requires an identity provider for authentication. For Dataverse, the ident
2929
3030
## App Registration
3131

32-
When you connect using OAuth you must first register an application in your Azure AD tenant. How you should register your app depends on the type of app you want to make.
32+
When you connect using OAuth, you must first register an application in your Azure AD tenant. How you should register your app depends on the type of app you want to make.
3333

34-
In all cases, start with basic steps to register an app described in the AAD topic: [Quickstart: Register an application with the Microsoft identity platform](/azure/active-directory/develop/quickstart-register-app). For Dataverse specific instructions see [Walkthrough: Register an app with Azure Active Directory > Create an application registration](walkthrough-register-app-azure-active-directory.md#create-an-application-registration).
34+
In all cases, start with basic steps to register an app described in the AD article: [Quickstart: Register an application with the Microsoft identity platform](/azure/active-directory/develop/quickstart-register-app). For Dataverse specific instructions see [Walkthrough: Register an app with Azure Active Directory > Create an application registration](walkthrough-register-app-azure-active-directory.md#create-an-application-registration).
3535

36-
The decisions you will need to make in this step mostly depend on the Application Type choice (see below).
36+
The decisions you need to make in this step mostly depend on the Application Type choice (see below).
3737

3838
### Types of app registration
3939

40-
When you register an app with Azure AD one of the decisions you must make is the application type. There are two types of applications you can register:
40+
When you register an app with Azure AD one of the decisions, you must make is the application type. There are two types of applications you can register:
4141

4242
| Application type | Description|
4343
|------------------|------------|
4444
| Web app /API | **Web client**<br />A type of [client application](/azure/active-directory/develop/developer-glossary#client-application) that executes all code on a web server.<br /><br />**User-agent-based client**<br />A type of [client application](/azure/active-directory/develop/developer-glossary#client-application) that downloads code from a web server and executes within a user-agent (for instance, a web browser), such as a Single Page Application (SPA). |
4545
|Native|A type of [client application](/azure/active-directory/develop/developer-glossary#client-application) that is installed natively on a device. |
4646

47-
When you select **Web app /API** you must provide a **Sign-On URL** which is the URL where Azure AD will send the authentication response, including a token if authentication was successful. While you develop an app, this is usually set to `https://localhost/appname:[port]` so you can develop and debug your app locally. When you publish your app, you need to change this value to the published URL of the app.
47+
When you select **Web app /API** you must provide a **Sign-On URL** which is the URL where Azure AD sends the authentication response, including a token if authentication was successful. While you develop an app, this URL is usually set to `https://localhost/appname:[port]` so you can develop and debug your app locally. When you publish your app, you need to change this value to the published URL of the app.
4848

49-
When you select **Native**, you must provide a Redirect URI. This is a unique identifier to which Azure AD will redirect the user-agent in an OAuth 2.0 request. This is typically a value formatted like so: `app://<guid>`.
49+
When you select **Native**, you must provide a Redirect URI. This URL is a unique identifier to which Azure AD will redirect the user-agent in an OAuth 2.0 request. This URL is typically a value formatted like so: `app://<guid>`.
5050

5151
### Giving access to Dataverse
5252

53-
If your app will be a client which allows the authenticated user to perform operations, you must configure the application to have the Access Dynamics 365 as organization users delegated permission.
53+
If your app is a client that allows the authenticated user to perform operations, you must configure the application to have the Access Dynamics 365 as organization users delegated permission.
5454

55-
For specific steps to do this, see [Walkthrough: Register an app with Azure Active Directory > Apply Permissions](walkthrough-register-app-azure-active-directory.md).
55+
For specific steps to set permissions, see [Walkthrough: Register an app with Azure Active Directory > Apply Permissions](walkthrough-register-app-azure-active-directory.md).
5656

5757
<!-- TODO Verify this -->
5858

59-
If your app will use Server-to-Server (S2S) authentication, this step is not required. That configuration requires a specific system user and the operations will be performed by that user account rather than any user that must be authenticated.
59+
If your app uses Server-to-Server (S2S) authentication, this step isn't required. That configuration requires a specific system user and the operations are performed by that user account rather than any user that must be authenticated.
6060

6161
### Use Client Secrets & Certificates
6262

63-
For server to server scenarios there will not be an interactive user account to authenticate. In these cases, you need to provide some means to confirm that the application is trusted. This is done using client secrets or certificates.
63+
For server-to-server scenarios there won't be an interactive user account to authenticate. In these cases, you need to provide some means to confirm that the application is trusted. This is done using client secrets or certificates.
6464

6565
For apps that are registered with the **Web app /API** application type, you can configure secrets. These are set using the **Keys** area under **API Access** in the **Settings** for the app registration.
6666

@@ -85,12 +85,14 @@ Dataverse SDK for .NET includes client classes [CrmServiceClient](xref:Microsoft
8585

8686
## Use the AccessToken with your requests
8787

88-
The point of using the authentication libraries is to get an access token that you can include with your requests.
89-
This only requires a few lines of code, and just a few more lines to configure an [HttpClient](xref:System.Net.Http.HttpClient) to execute a request.
88+
The point of using the authentication libraries is to get an access token that you can include with your requests. Getting the token only requires a few lines of code, and just a few more lines to configure an [HttpClient](xref:System.Net.Http.HttpClient) to execute a request.
89+
90+
> [!IMPORTANT]
91+
> As demonstrated in the sample code of this article, use a "\<environment-url>/user_impersonation" scope for a public client. For a confidential client, use a scope of "\<environment-url>/.default".
9092
9193
### Simple example
9294

93-
The following is the minimum amount of code needed to execute a single Web API request, but it is not the recommended approach. Note that this code uses the MSAL library and is taken from the [QuickStart](https://github.com/microsoft/PowerApps-Samples/tree/master/dataverse/webapi/C%23/QuickStart) sample.
95+
The following is the minimum amount of code needed to execute a single Web API request, but it isn't the recommended approach. Note that this code uses the MSAL library and is taken from the [QuickStart](https://github.com/microsoft/PowerApps-Samples/tree/master/dataverse/webapi/C%23/QuickStart) sample.
9496

9597
```csharp
9698
string resource = "https://contoso.api.crm.dynamics.com";
@@ -102,7 +104,7 @@ var authBuilder = PublicClientApplicationBuilder.Create(clientId)
102104
.WithAuthority(AadAuthorityAudience.AzureAdMultipleOrgs)
103105
.WithRedirectUri(redirectUri)
104106
.Build();
105-
var scope = resource + "/.default";
107+
var scope = resource + "/user_impersonation";
106108
string[] scopes = { scope };
107109

108110
AuthenticationResult token =
@@ -148,7 +150,7 @@ class OAuthMessageHandler : DelegatingHandler
148150
.WithAuthority(AadAuthorityAudience.AzureAdMultipleOrgs)
149151
.WithRedirectUri(redirectUrl)
150152
.Build();
151-
var scope = serviceUrl + "//.default";
153+
var scope = serviceUrl + "/user_impersonation";
152154
string[] scopes = { scope };
153155
// First try to get an authentication token from the cache using a hint.
154156
AuthenticationResult authBuilderResult=null;

powerapps-docs/developer/data-platform/data-export-service.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ var authBuilder = PublicClientApplicationBuilder.Create(AppId)
117117
.WithAuthority(AadAuthorityAudience.AzureAdMultipleOrgs)
118118
.WithRedirectUri(redirectUri)
119119
.Build();
120-
var scope = resource + "/.default";
120+
var scope = resource + "/user_impersonation";
121121
string[] scopes = { scope };
122122

123123
// Use interactive username and password prompt

powerapps-docs/developer/data-platform/webapi/quick-start-console-app-csharp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Follow these next steps to add code for the main program.
100100
.WithAuthority(AadAuthorityAudience.AzureAdMultipleOrgs)
101101
.WithRedirectUri(redirectUri)
102102
.Build();
103-
var scope = resource + "/.default";
103+
var scope = resource + "/user_impersonation";
104104
string[] scopes = { scope };
105105

106106
AuthenticationResult token =
174 KB
Loading

powerapps-docs/user/modern-fluent-design.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Modern, refreshed look for model-driven apps
33
description: Learn about the updated, user interface that makes model-driven apps easier to use.
44
author: chmoncay
55
ms.topic: overview
6-
ms.date: 10/09/2023
6+
ms.date: 10/17/2023
77
ms.service: powerapps
88
ms.subservice: end-user
99
ms.author: chmoncay
@@ -14,6 +14,7 @@ search.audienceType:
1414
- enduser
1515
contributors:
1616
- HemantGaur
17+
- adrianorth
1718

1819
---
1920

@@ -42,7 +43,7 @@ The _floating_ command bar aligns with the Microsoft 365 experience, with consis
4243
### View pages
4344
View pages use the new command bar and have updated grid areas that take advantage of the elevation changes to help draw the user's attention.
4445

45-
The biggest change on view pages is the switch from the read-only grid to the [Power Apps grid control (preview)](../maker/model-driven-apps/the-power-apps-grid-control.md), which features infinite scrolling for a modern, data browsing experience. This grid also appears in subgrids and associated grids in main forms, but isn't yet supported in dashboards. The Power Apps grid control also supports inline editing using the **Enable filtering** property. Makers may manually configure their editable grids to use the Power Apps grid control.
46+
The biggest change on view pages is the switch from the read-only grid to the [Power Apps grid control](../maker/model-driven-apps/the-power-apps-grid-control.md), which features infinite scrolling for a modern, data browsing experience. This grid also appears in subgrids and associated grids in main forms and dashboards. The Power Apps grid control also supports inline editing using the **Enable filtering** property. Makers may manually configure their editable grids to use the Power Apps grid control.
4647

4748
The following example shows a view page with the modern, refreshed look.
4849

@@ -64,6 +65,11 @@ The following example shows a set of fields with the modern, refreshed look.
6465

6566
:::image type="content" source="media/modern-fields.png" alt-text="Fields in a model-driven app that has the modern, refreshed look.":::
6667

68+
### Dashboard page
69+
The system dashboard page, with independent subgrids and charts, has been updated to use the new [command bar](#command-bar) and has styling similar to the sections in form and view pages. When the modern experience is enabled, or when using the [monthly channel](../maker/model-driven-apps/channel-overview.md), the system dashboard grids use the new [Power Apps grid control](../maker/model-driven-apps/the-power-apps-grid-control.md). The new grid is not enabled by default.
70+
71+
:::image type="content" source="media/modern-system-dashboard.png" alt-text="System dashboard page with the modern, refreshed look.":::
72+
6773
## Turn on the new look
6874
End users can enable the modern, refreshed look for their model-driven apps in the app by enabling the **Try the new look** setting in the header of their app. They can switch back at [anytime](modern-fluent-design.md#can-i-revert-to-the-old-ui).
6975

@@ -91,15 +97,15 @@ Yes, end users can switch back to the old UI by turning off the **Try the new lo
9197

9298
For more information about disabling the modern, refreshed look, see [Manage model-driven app settings in the app designer](../maker/model-driven-apps/app-properties.md).
9399

94-
Admins can disable the **Try the new look** setting across all apps in an organization by using the solution explorer to set the **Try the new look** value to **No**.
100+
Admins can disable the **Try the new look** setting across all apps in an organization by using the solution explorer to set the **Try the new look** value to **No**. This hides the **Try the new look** toggle and prevents the new look from taking effect.
95101

96102
1. Create a new solution.
97103
1. Select **Add Existing** > **More** > **Setting**.
98104
1. Search for **Try**.
99105
1. Select **Try the new look**.
100106

101107
> [!NOTE]
102-
> There are two settings: **Try the new look** and **Try the new look and feel (preview)**.
108+
> There are two settings: **Try the new look** and **Try the new look and feel (preview)**. The first setting is turned on by default, but it can be overriden. The second setting was used in the public preview phase to allow users to have the new look, but it did not show as a toggle.
103109
104110
1. Select **Add** to add it to the solution.
105111
1. Select **Try the new look** from the solution explorer.

0 commit comments

Comments
 (0)