Skip to content

Commit 4696eb3

Browse files
committed
Merge remote-tracking branch 'origin/main' into matp-2863997
2 parents e057d02 + 3b94c86 commit 4696eb3

File tree

158 files changed

+1502
-897
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+1502
-897
lines changed

.openpublishing.redirection.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
{
22
"redirections": [
3+
{
4+
"source_path": "powerapps-docs/developer/data-platform/webapi/aad-group-team.md",
5+
"redirect_url": "../aad-group-team",
6+
"redirect_document_id": false
7+
},
8+
{
9+
"source_path": "powerapps-docs/developer/data-platform/walkthrough-registering-configuring-simplespa-application-adal-js.md",
10+
"redirect_url": "quick-start-register-configure-simplespa-application-msal-js",
11+
"redirect_document_id": false
12+
},
13+
{
14+
"source_path": "powerapps-docs/maker/data-platform/azure-synapse-link-copy-sql.md",
15+
"redirect_url": "azure-synapse-link-pipelines",
16+
"redirect_document_id": false
17+
},
318
{
419
"source_path": "powerapps-docs/developer/data-platform/webapi/samples/cdswebapiservice.md",
520
"redirect_url": "webapiservice",
@@ -7206,4 +7221,4 @@
72067221
"redirect_document_id": "false"
72077222
}
72087223
]
7209-
}
7224+
}

powerapps-docs/developer/data-platform/TOC.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
href: security-access-coding.md
2525
- name: Security roles and templates
2626
href: security-roles.md
27+
- name: Active Directory group teams
28+
href: aad-group-team.md
2729
- name: Work with data using code
2830
href: work-with-data.md
2931
items:
@@ -450,8 +452,8 @@
450452
href: walkthrough-register-app-azure-active-directory.md
451453
- name: "Tutorial: Create an ASP.NET Core Blazor WebAssembly App"
452454
href: walkthrough-blazor-webassembly-single-tenant.md
453-
- name: "Tutorial: Register and configuring a SPA application with adal.js"
454-
href: walkthrough-registering-configuring-simplespa-application-adal-js.md
455+
- name: "Quick Start: Register and configure a SPA application with msal.js"
456+
href: quick-start-register-configure-simplespa-application-msal-js.md
455457
- name: Transition apps to Dataverse ServiceClient
456458
href: sdk-client-transition.md
457459
- name: Best practices

powerapps-docs/developer/data-platform/webapi/aad-group-team.md renamed to powerapps-docs/developer/data-platform/aad-group-team.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,10 @@ GET [Organization URI]/api/data/v9.0/RetrieveAadUserPrivileges(DirectoryObjectId
245245

246246
If you have a non-interactive process where your service needs to check if the user has access rights to a record, you can make a [RetrievePrincipalAccess function](/dynamics365/customer-engagement/web-api/retrieveprincipalaccess) call on behalf of the user by specifying the `CallerID`.
247247

248-
More information: [Impersonate another user](../impersonate-another-user.md)
248+
More information: [Impersonate another user](impersonate-another-user.md)
249249

250250
### See also
251251

252252
[Manage app and resource access using Azure Active Directory groups](/azure/active-directory/fundamentals/active-directory-manage-groups)
253253

254-
[!INCLUDE[footer-include](../../../includes/footer-banner.md)]
254+
[!INCLUDE[footer-include](../../includes/footer-banner.md)]

powerapps-docs/developer/data-platform/api-limits.md

Lines changed: 31 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
---
22
title: "Service protection API limits (Microsoft Dataverse) | Microsoft Docs"
3-
description: "Understand the service protection limits for API requests."
4-
ms.custom: ""
5-
ms.date: 03/22/2022
6-
ms.reviewer: "jdaly"
7-
ms.topic: "article"
8-
author: "divka78"
3+
description: "Understand what a developer needs to do to manage service protection limits for API requests."
4+
ms.date: 09/15/2022
5+
ms.reviewer: jdaly
6+
ms.topic: article
7+
author: divka78
98
ms.subservice: dataverse-developer
10-
ms.author: "jdaly"
11-
manager: "ryjones"
9+
ms.author: dikamath
1210
search.audienceType:
1311
- developer
1412
search.app:
@@ -251,61 +249,39 @@ If you are using the Web API with a client library, you may find that it support
251249
If you have written your own library, you can include behaviors to be similar to the one included in this sample code for a helper [WebAPIService class library (C#)](webapi/samples/webapiservice.md).
252250

253251
```csharp
254-
private async Task<HttpResponseMessage> SendAsync(
255-
HttpRequestMessage request,
256-
HttpCompletionOption httpCompletionOption = HttpCompletionOption.ResponseHeadersRead,
257-
int retryCount = 0)
252+
/// <summary>
253+
/// Specifies the Retry policies
254+
/// </summary>
255+
/// <param name="config">Configuration data for the service</param>
256+
/// <returns></returns>
257+
static IAsyncPolicy<HttpResponseMessage> GetRetryPolicy(Config config)
258258
{
259-
HttpResponseMessage response;
260-
try
261-
{
262-
//The request is cloned so it can be sent again.
263-
response = await httpClient.SendAsync(request.Clone(), httpCompletionOption);
264-
}
265-
catch (Exception)
266-
{
267-
throw;
268-
}
269-
270-
if (!response.IsSuccessStatusCode)
271-
{
272-
if ((int)response.StatusCode != 429)
273-
{
274-
//Not a service protection limit error
275-
throw ParseError(response);
276-
}
277-
else
278-
{
279-
// Give up re-trying if exceeding the maxRetries
280-
if (++retryCount >= config.MaxRetries)
281-
{
282-
throw ParseError(response);
283-
}
284-
259+
return HttpPolicyExtensions
260+
.HandleTransientHttpError()
261+
.OrResult(httpResponseMessage => httpResponseMessage.StatusCode == System.Net.HttpStatusCode.TooManyRequests)
262+
.WaitAndRetryAsync(
263+
retryCount: config.MaxRetries,
264+
sleepDurationProvider: (count, response, context) =>
265+
{
285266
int seconds;
286-
//Try to use the Retry-After header value if it is returned.
287-
if (response.Headers.Contains("Retry-After"))
267+
HttpResponseHeaders headers = response.Result.Headers;
268+
269+
if (headers.Contains("Retry-After"))
288270
{
289-
seconds = int.Parse(response.Headers.GetValues("Retry-After").FirstOrDefault());
271+
seconds = int.Parse(headers.GetValues("Retry-After").FirstOrDefault());
290272
}
291273
else
292274
{
293-
//Otherwise, use an exponential backoff strategy
294-
seconds = (int)Math.Pow(2, retryCount);
275+
seconds = (int)Math.Pow(2, count);
295276
}
296-
await Task.Delay(TimeSpan.FromSeconds(seconds));
297-
298-
return await SendAsync(request, httpCompletionOption, retryCount);
299-
}
300-
}
301-
else
302-
{
303-
return response;
304-
}
277+
return TimeSpan.FromSeconds(seconds);
278+
},
279+
onRetryAsync: (_, _, _, _) => { return Task.CompletedTask; }
280+
);
305281
}
306282
```
307283

308-
You may also want to use [Polly](https://github.com/App-vNext/Polly), a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner.
284+
This example uses [Polly](https://github.com/App-vNext/Polly), a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner.
309285

310286
### HTTP Response headers
311287

@@ -334,7 +310,7 @@ If you are using the Organization Service, we recommend that you use the <xref:M
334310

335311
Since Xrm.Tooling.Connector version 9.0.2.16, it will automatically pause and re-send the request after the Retry-After duration period.
336312

337-
If your application is currently using the low-level <xref:Microsoft.Xrm.Sdk.Client>.<xref:Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy> or <xref:Microsoft.Xrm.Sdk.WebServiceClient>.<xref:Microsoft.Xrm.Sdk.WebServiceClient.OrganizationWebProxyClient> classes. You should be able to replace those with the CrmServiceClient class. The <xref:Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy> is deprecated.
313+
If your application is currently using the low-level <xref:Microsoft.Xrm.Sdk.Client>.<xref:Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy> or <xref:Microsoft.Xrm.Sdk.WebServiceClient>.<xref:Microsoft.Xrm.Sdk.WebServiceClient.OrganizationWebProxyClient> classes. You should be able to replace those with the CrmServiceClient or ServiceClient class. The <xref:Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy> is deprecated.
338314

339315
More information:
340316

@@ -345,7 +321,7 @@ More information:
345321

346322
To achieve optimum throughput you should use multiple-threads. The Task Parallel Library (TPL) makes developers more productive by simplifying the process of adding parallelism and concurrency to applications.
347323

348-
TPL can be used with <xref:Microsoft.Xrm.Tooling.Connector.CrmServiceClient> because CrmServiceClient includes a <xref:Microsoft.Xrm.Tooling.Connector.CrmServiceClient.Clone> method that allows for managing multiple instances of the client with TPL. For an example, see [Sample: Task Parallel Library with CrmServiceClient](xrm-tooling/sample-tpl-crmserviceclient.md).
324+
TPL can be used with either <xref:Microsoft.Xrm.Tooling.Connector.CrmServiceClient> or <xref:Microsoft.PowerPlatform.Dataverse.Client.ServiceClient> because both classes include a `Clone` method that allows for managing multiple instances of the client with TPL. For an example, see [Sample: Task Parallel Library with CrmServiceClient](xrm-tooling/sample-tpl-crmserviceclient.md).
349325

350326
## Frequently asked questions
351327

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

Lines changed: 32 additions & 23 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: 07/28/2022
5+
ms.date: 09/12/2022
66
ms.reviewer: pehecke
77
ms.topic: article
88
author: ritesp # GitHub ID
@@ -61,10 +61,6 @@ For specific steps to do this, see [Walkthrough: Register an app with Azure Acti
6161

6262
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.
6363

64-
### Enable Implicit Flow
65-
66-
If you are configuring an app for a Single Page Application (SPA) you must edit the Manifest to set the `oauth2AllowImplicitFlow` value to `true`. More information: [Walkthrough: Registering and configuring a SPA application with adal.js](walkthrough-registering-configuring-simplespa-application-adal-js.md)
67-
6864
### Use Client Secrets & Certificates
6965

7066
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.
@@ -145,45 +141,58 @@ The following is an example of a custom class derived from <xref:System.Net.Http
145141
class OAuthMessageHandler : DelegatingHandler
146142
{
147143
private AuthenticationHeaderValue authHeader;
148-
149144
public OAuthMessageHandler(string serviceUrl, string clientId, string redirectUrl, string username, string password,
150145
HttpMessageHandler innerHandler)
151146
: base(innerHandler)
152147
{
153-
154148
string apiVersion = "9.2";
155149
string webApiUrl = $"{serviceUrl}/api/data/v{apiVersion}/";
156-
157-
//Build Microsoft.Identity.Client (MSAL) OAuth Token Request
158150
var authBuilder = PublicClientApplicationBuilder.Create(clientId)
159151
.WithAuthority(AadAuthorityAudience.AzureAdMultipleOrgs)
160152
.WithRedirectUri(redirectUrl)
161153
.Build();
162154
var scope = serviceUrl + "//.default";
163155
string[] scopes = { scope };
164-
165-
AuthenticationResult authBuilderResult;
166-
if (username != string.Empty && password != string.Empty)
156+
// First try to get an authentication token from the cache using a hint.
157+
AuthenticationResult authBuilderResult=null;
158+
try
167159
{
168-
//Make silent Microsoft.Identity.Client (MSAL) OAuth Token Request
169-
var securePassword = new SecureString();
170-
foreach (char ch in password) securePassword.AppendChar(ch);
171-
authBuilderResult = authBuilder.AcquireTokenByUsernamePassword(scopes, username, securePassword)
172-
.ExecuteAsync().Result;
160+
authBuilderResult = authBuilder.AcquireTokenSilent(scopes, username)
161+
.ExecuteAsync().Result;
173162
}
174-
else
163+
catch (Exception ex)
175164
{
176-
//Popup authentication dialog box to get token
177-
authBuilderResult = authBuilder.AcquireTokenInteractive(scopes)
178-
.ExecuteAsync().Result;
165+
System.Diagnostics.Debug.WriteLine(
166+
$"Error acquiring auth token from cache:{System.Environment.NewLine}{ex}");
167+
// Token cache request failed, so request a new token.
168+
try
169+
{
170+
if (username != string.Empty && password != string.Empty)
171+
{
172+
// Request a token based on username/password credentials.
173+
authBuilderResult = authBuilder.AcquireTokenByUsernamePassword(scopes, username, password)
174+
.ExecuteAsync().Result;
175+
}
176+
else
177+
{
178+
// Prompt the user for credentials and get the token.
179+
authBuilderResult = authBuilder.AcquireTokenInteractive(scopes)
180+
.ExecuteAsync().Result;
181+
}
182+
}
183+
catch (Exception msalex)
184+
{
185+
System.Diagnostics.Debug.WriteLine(
186+
$"Error acquiring auth token with user credentials:{System.Environment.NewLine}{msalex}");
187+
throw;
188+
}
179189
}
180-
181190
//Note that an Azure AD access token has finite lifetime, default expiration is 60 minutes.
182191
authHeader = new AuthenticationHeaderValue("Bearer", authBuilderResult.AccessToken);
183192
}
184193

185194
protected override Task<HttpResponseMessage> SendAsync(
186-
HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)
195+
HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)
187196
{
188197
request.Headers.Authorization = authHeader;
189198
return base.SendAsync(request, cancellationToken);

powerapps-docs/developer/data-platform/bypass-custom-business-logic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ No. If a synchronous plug-in or real-time workflow in a Microsoft solution perfo
191191

192192
### Can I use this option for data operations I perform within a plug-in?
193193

194-
Yes, But only when the plug-in is running in the context of a user who has the `prvByPassPlugins` privilege. For the Organization Service, set the optional `BypassCustomPluginExecution` parameter on the class derived from [OrganizationRequest Class](/dotnet/api/microsoft.xrm.sdk.organizationrequest). You cannot use the CrmServiceClient in a plug-in.
194+
Yes, But only when the plug-in is running in the context of a user who has the `prvByPassPlugins` privilege. For the Organization Service, set the optional `BypassCustomPluginExecution` parameter on the class derived from [OrganizationRequest Class](/dotnet/api/microsoft.xrm.sdk.organizationrequest). You cannot use the CrmServiceClient or ServiceClient classes in a plug-in.
195195

196196
### What about asychronous plug-in steps, asynchronous workflows and flows?
197197

powerapps-docs/developer/data-platform/create-custom-api-with-code.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ OData-EntityId: [Organization URI]/api/data/v9.1/customapis(b532b299-4684-eb11-a
101101

102102
## Create a Custom API using the Organization Service
103103

104-
This code uses the <xref:Microsoft.Xrm.Tooling.Connector.CrmServiceClient> with a early-bound programming style: More information:
104+
This code uses the <xref:Microsoft.Xrm.Tooling.Connector.CrmServiceClient> with a early-bound programming style. You can also use <xref:Microsoft.PowerPlatform.Dataverse.Client.ServiceClient>. More information:
105105

106106
- [Use CrmServiceClient constructors to connect to Dataverse](xrm-tooling/use-crmserviceclient-constructors-connect.md)
107107
- [Late-bound and Early-bound programming using the Organization service](org-service/early-bound-programming.md)
@@ -122,6 +122,7 @@ string conn = $@"
122122
LoginPrompt=Auto;
123123
RequireNewInstance = True";
124124

125+
//var service = new ServiceClient(conn);
125126
var service = new CrmServiceClient(conn);
126127

127128
//The plug-in type
@@ -180,10 +181,9 @@ Guid customAPIId = ((CreateResponse)service.Execute(createReq)).id;
180181
### See also
181182

182183
[Create and use Custom APIs](custom-api.md)<br/>
183-
[CustomAPI tables](custom-api-tables.md)<br/>
184+
[Custom API tables](custom-api-tables.md)<br/>
184185
[Create a Custom API using the plug-in registration tool](create-custom-api-prt.md)<br/>
185186
[Create a Custom API in Power Apps](create-custom-api-maker-portal.md)<br/>
186187
[Create a Custom API with solution files](create-custom-api-solution.md)<br/>
187188

188-
189189
[!INCLUDE[footer-include](../../includes/footer-banner.md)]

powerapps-docs/developer/data-platform/dataverse-sql-query.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ select name, fullname from account a inner join contact c on a.primarycontactid
7070

7171
![Another query using a JOIN.](media/ssms-join-query.PNG)
7272

73-
### Power BI
73+
### Power BI (General Availability)
7474

7575
You can use the **Analyze in Power BI** option (**Data** > **Tables** > **Analyze in Power BI**) in Power Apps (https://make.powerapps.com) to use the Dataverse connector to analyze data in Power BI Desktop. More information: [View table data in Power BI Desktop](/powerapps/maker/data-platform/view-entity-data-power-bi)
7676

@@ -81,7 +81,7 @@ You can use the **Analyze in Power BI** option (**Data** > **Tables** > **Analyz
8181

8282
Any operation that attempts to modify data (that is, INSERT, UPDATE) will not work with this read-only SQL data connection. For a detailed list of supported SQL operations on the Dataverse endpoint, see [How Dataverse SQL differs from Transact-SQL](how-dataverse-sql-differs-from-transact-sql.md).
8383

84-
The following Dataverse datatypes are not supported with the SQL connection: `binary`, `image`, `sql_variant`, `varbinary`, `virtual`, `HierarchyId`, `managedproperty`, `file`, `xml`, `partylist`, `timestamp`, `choices`. In addition, tables types 'virtual' and 'audit' are not supported at this time.
84+
The following Dataverse datatypes are not supported with the SQL connection: `binary`, `image`, `sql_variant`, `varbinary`, `virtual`, `HierarchyId`, `managedproperty`, `file`, `xml`, `partylist`, `timestamp`, `choices`. In addition, tables types 'virtual' and 'audit' are not supported at this time.
8585

8686
> [!TIP]
8787
> `partylist` attributes can instead be queried by joining to the `activityparty` table as shown below.
@@ -181,8 +181,8 @@ This means the port has been blocked at the client.
181181
182182
### See also
183183
184+
[Get started with virtual tables (entities)](./virtual-entities/get-started-ve.md)
184185
[Use FetchXML to construct a query](dataverse-sql-query.md)
185186
[Service Protection API Limits](api-limits.md)
186187
187-
188188
[!INCLUDE[footer-include](../../includes/footer-banner.md)]

powerapps-docs/developer/data-platform/how-dataverse-sql-differs-from-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "How Dataverse SQL Differs from Transact-SQL | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
33
description: "Learn what subset of the Transact-SQL language is supported by the Dataverse SQL endpoint." # 115-145 characters including spaces. This abstract displays in the search result.
44
ms.custom: ""
5-
ms.date: 12/16/2020
5+
ms.date: 09/09/2022
66
ms.reviewer: "pehecke"
77

88
ms.topic: "article"
@@ -92,6 +92,7 @@ More information: [Transact-SQL statements](/sql/t-sql/statements/statements)
9292
- All WHERE conditions
9393
- All nested queries (SELECT, FROM, WHERE)
9494
- Union
95+
- PIVOT and UNPIVOT
9596
- [GROUP BY](#select-group-by)/Having
9697
- General
9798
- IF THEN ELSE
@@ -106,7 +107,6 @@ More information: [Transact-SQL statements](/sql/t-sql/statements/statements)
106107
- DCL
107108
- Stored Procedure
108109
- DQL
109-
- Pivot
110110
- DQL XML function
111111
- DQL JSON function
112112
- CUBE and ROLLUP
Loading

0 commit comments

Comments
 (0)