Skip to content

Commit 574b8ef

Browse files
committed
Merge branch 'master' into task1668696-portals-tlssupport
2 parents 456f167 + e0f1c69 commit 574b8ef

File tree

73 files changed

+655
-240
lines changed

Some content is hidden

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

73 files changed

+655
-240
lines changed

powerapps-docs/developer/common-data-service/TOC.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@
395395
href: authenticate-dot-net-framework.md
396396
- name: Use OAuth
397397
href: authenticate-oauth.md
398+
- name: Office365 authentication with WS-Trust
399+
href: authenticate-office365-deprecation.md
398400
- name: "Tutorial: Register an app with Azure Active Directory"
399401
href: walkthrough-register-app-azure-active-directory.md
400402
- name: Build web applications using Server-to-Server (S2S) authentication
@@ -431,6 +433,8 @@
431433
items:
432434
- name: Download tools from NuGet
433435
href: download-tools-nuget.md
436+
- name: Install Power Apps CLI
437+
href: powerapps-cli.md
434438
- name: Community Tools
435439
href: community-tools.md
436440
- name: Testing tools
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
title: "Use of Office365 authentication with the WS-Trust security protocol (Common Data Service) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
3+
description: "Describes deprecation of the WS-Trust security protocol and the authentication code changes required in applications."
4+
ms.custom: ""
5+
ms.date: 02/05/2020
6+
ms.reviewer: ""
7+
ms.service: powerapps
8+
ms.topic: "article"
9+
author: "phecke" # GitHub ID
10+
ms.author: "pehecke" # MSFT alias of Microsoft employees only
11+
manager: "kvivek" # MSFT alias of manager or PM counterpart
12+
search.audienceType:
13+
- developer
14+
search.app:
15+
- PowerApps
16+
- D365CE
17+
---
18+
19+
# Use of Office365 authentication with the WS-Trust security protocol
20+
21+
Use of the WS-Trust authentication security protocol when connecting to Common
22+
Data Service is no longer recommended and has been
23+
deprecated; see the [announcement](/power-platform/important-changes-coming#deprecation-of-office365-authentication-type-and-organizationserviceproxy-class-for-connecting-to-common-data-service).
24+
25+
This change
26+
impacts custom client applications that use “Office365” authentication and the
27+
[Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy](/dotnet/api/microsoft.xrm.sdk.client.organizationserviceproxy)
28+
or
29+
[Microsoft.Xrm.Tooling.Connector.CrmServiceClient](/dotnet/api/microsoft.xrm.tooling.connector.crmserviceclient)
30+
classes. If your applications use this type of authentication protocol and API,
31+
continue reading below to learn more about the recommended authentication
32+
changes to be made to your application’s code.
33+
34+
## How do I know if my code or application is using WS-Trust?
35+
36+
First and most importantly, this change **only** impacts client applications that
37+
connect to the Common Data Service. It does not impact custom plug-ins,
38+
workflow activities, or on-premises/IFD service connections.
39+
40+
- If your code employs user account and password credentials for authentication with Common Data Service or an application, you are likely using the WS-Trust security protocol. Some examples are shown below, though this list is not fully inclusive.
41+
42+
- When using the [CrmServiceClient](/dotnet/api/microsoft.xrm.tooling.connector.crmserviceclient) class with a connection string:
43+
44+
`connectionString="AuthType=Office365; Username=jsmith\@contoso.onmicrosoft.com;Password=passcode;Url=https://contoso.crm.dynamics.com"`
45+
46+
- When using [OrganizationServiceProxy](/dotnet/api/microsoft.xrm.sdk.client.organizationserviceproxy) class constructors:
47+
48+
49+
```csharp
50+
using (OrganizationServiceProxy organizationServiceProxy =
51+
new OrganizationServiceProxy(serviceManagement, clientCredentials)
52+
{ ... }
53+
```
54+
55+
- If you are using the `OrganizationServiceProxy` class at all in your code, you are using WS-Trust.
56+
57+
- If you are using [CrmServiceClient](/dotnet/api/microsoft.xrm.tooling.connector.crmserviceclient).`OrganizationServiceProxy` in your code, you are using WS-Trust.
58+
59+
## What should I do to fix my application code if affected?
60+
61+
There are very straight forward ways to modify your applications code to use
62+
the recommended connection interface for authentication with Common Data
63+
Service.
64+
65+
- If your code uses an [Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy](/dotnet/api/microsoft.xrm.sdk.client.organizationserviceproxy) instance:
66+
67+
If you are passing the `OrganizationServiceProxy` instance around to various methods, or returning the instance from a function, replace all occurrences of the type `OrganizationServiceProxy` with the [IOrganizationService](/dotnet/api/microsoft.xrm.sdk.iorganizationservice?view=dynamics-general-ce-9) interface. This interface exposes all the core methods used to communicate with Common Data Service.
68+
69+
When invoking the constructor, it is recommend you add the NuGet package [Microsoft.CrmSdk.XrmTooling.CoreAssembly](https://www.nuget.org/packages/Microsoft.CrmSdk.XrmTooling.CoreAssembly/) to your project and replace all use of `OrganizationServiceProxy` class constructors with [CrmServiceClient](/dotnet/api/microsoft.xrm.tooling.connector.crmserviceclient) class constructors. You will need to alter your coding pattern here, however, for simplicity `CrmServiceClient` supports connection strings in addition to complex constructors and the ability to provide external authentication handlers. `CrmServiceClient` implements `IOrganizationService`, therefore your new authentication code will be portable to the rest of your application code. You can find examples on the use of `CrmServiceClient` in the [PowerApps-Samples](https://github.com/microsoft/PowerApps-Samples/tree/master/cds/orgsvc/C%23) repository.
70+
71+
- If your code is using [CrmServiceClient](/dotnet/api/microsoft.xrm.tooling.connector.crmserviceclient) with theOffice365authentication
72+
type:
73+
74+
An example of this is a connections string that looks like this:
75+
76+
`connectionString = "AuthType=Office365;Username=jsmith@contoso.onmicrosoft.com;Password=passcode;Url=https://contoso.crm.dynamics.com"`
77+
78+
Similarly, you could also use a `CrmServiceClient` constructor and pass in `AuthType.Office365`.
79+
80+
You have two options for dealing with this.<p/>
81+
82+
- Switch over to using an OAuth based connection string. Such connection string looks like this:
83+
84+
`connectionString = "AuthType=OAuth;Username=jsmith@contoso.onmicrosoft.com;
85+
Password=passcode;Url=https://contosotest.crm.dynamics.com;AppId=51f81489-12ee-4a9e-aaae-a2591f45987d;
86+
RedirectUri=app://58145B91-0C36-4500-8554-080854F2AC97;LoginPrompt=Auto"`
87+
88+
This will be your fastest way to update the code. Note that LoginPrompt can be set toneverto simulate the way that the Office 365 behavior worked.
89+
90+
The AppId and RedirectUri provided above are examples of working application registration values. These values work everywhere our online services are deployed. However, they are provided here as examples and you are encouraged to create your own application registration in Azure Active Directory (AAD) for applications running in your tenant.<p/>
91+
92+
- When we announce it, update to the latest [Microsoft.CrmSdk.XrmTooling.CoreAssembly](https://www.nuget.org/packages/Microsoft.CrmSdk.XrmTooling.CoreAssembly/) NuGet package that includes auto redirect support. This library will redirect an authentication type of Office365 to OAuth and use the example AppId and Redirect URI automatically. This capability is planned for the 9.2.x version of the Microsoft.CrmSdk.XrmTooling.CoreAssembly package.
93+
94+
- If you are accessing the [CrmServiceClient](/dotnet/api/microsoft.xrm.tooling.connector.crmserviceclient).`OrganizationServiceProxy` property:
95+
96+
Remove all use of that property in your code. `CrmServiceClient` implements `IOrganizationService` and exposes everything that is settable for the organization service proxy.
97+
98+
> [!IMPORTANT]
99+
> Regarding not being able to login using User ID/Password even if using OAuth: if your tenant and user is configured in Azure Active Directory for conditional access and/or Multi-Factor Authentication is required, you will not be able to use user ID/password flows in a non-interactive form at all. For those situations, you must use a Service Principal user to authenticate with Common Data Service.<p/>
100+
To do this, you must first register the application user (Service Principal) in Azure Active Directory. You can find out how to do this [here](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). During application registration you will need to create that user in Common Data Service and grant permissions. Those permissions can either be granted directly or indirectly by adding the application user to a team which has been granted permissions in Common Data Service. You can find more information on how to set up an application user to authenticate with Common Data Service [here](/powerapps/developer/common-data-service/use-single-tenant-server-server-authentication).
101+
102+
## Need help?
103+
104+
We will be monitoring the Power Apps ALM and ProDev community [forums](https://powerusers.microsoft.com/t5/Power-Apps-Component-Framework/bd-p/pa_component_framework). Please take a look there to get help on how to solve various issues or post a
105+
question.

powerapps-docs/developer/common-data-service/authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Office 365 authentication requires using the .NET Framework SDK assemblies with
4545

4646
Using Office 365 authentication does not require that your register your applications as OAuth does. You must simply provide a User Principal Name (UPN) and password for a valid user.
4747

48-
More information: [Authentication with .NET Framework applications](authenticate-dot-net-framework.md)
48+
More information: [Authentication with .NET Framework applications](authenticate-dot-net-framework.md), [Use of Office365 authentication with the WS-Trust security protocol](authenticate-office365-deprecation.md)
4949

5050
## All other software frameworks
5151

powerapps-docs/developer/common-data-service/configure-entity-relationship-cascading-behavior.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ The `CascadeConfiguration` (<xref:Microsoft.Xrm.Sdk.Metadata.CascadeConfiguratio
5757
|Reparent|See [About the reparent action](#about-the-reparent-action) later.|Active<br />Cascade<br />NoCascade<br />UserOwned|
5858
|Share|When the referenced entity record is shared with another user.|Active<br />Cascade<br />NoCascade<br />UserOwned|
5959
|Unshare|When sharing is removed for the referenced entity record.|Active<br />Cascade<br />NoCascade<br />UserOwned|
60-
60+
61+
> [!NOTE]
62+
> When executing an assign, any workflows or business rules that are currently active on the records will automatically be
63+
> deactivated when the reassignment occurs. The new owner of the record will need to reactivate the workflow or business rule
64+
> if they want to continue using it.
65+
6166
<a name="BKMK_ReparentAction"></a>
6267
### About the reparent action
6368
The reparent action is very similar to the share action except that it deals with the inherited read access rights instead of explicit read access rights. The reparent action is when you change the value of the referencing attribute in a parental relationship. When a reparent action occurs, the desired scope of the inherited read access rights for related entities might change. The cascade actions related to the reparent action refer to changes to read access rights for the entity record and any entity records related to it.

powerapps-docs/developer/common-data-service/org-service/metadata-option-sets.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ context of the publisher set for the solution that the option set is created in.
2626
This prefix helps reduce the chance of creating duplicate option sets for a managed solution,
2727
and in any option sets that are defined in organizations where your managed solution is installed. For more information,
2828
see [Merge option set options](../understand-managed-solutions-merged.md#merge-option-set-options).
29-
29+
30+
You can download the sample from [here](https://github.com/microsoft/PowerApps-Samples/tree/master/cds/orgsvc/C%23/WorkWithOptionSets).
31+
3032
## Messages Request Classes
3133

3234
Use the following message request classes to work with global option sets

powerapps-docs/developer/common-data-service/org-service/metadata-relationshipmetadata.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Create and retrieve entity relationship (Common Data Service) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
33
description: "Shows code samples to create and retrieve entity relationships." # 115-145 characters including spaces. This abstract displays in the search result.
44
ms.custom: ""
5-
ms.date: 10/31/2018
5+
ms.date: 01/28/2020
66
ms.reviewer: ""
77
ms.service: powerapps
88
ms.topic: "article"
@@ -17,12 +17,12 @@ search.app:
1717
---
1818
# Create and retrieve entity relationships
1919

20-
<!-- https://docs.microsoft.com/dynamics365/customer-engagement/developer/org-service/create-retrieve-entity-relationships -->
21-
22-
This topic shows how to create and retrieve entity relationships.
20+
This topic shows how to create and retrieve entity relationships. You can download the sample from [here](https://github.com/microsoft/PowerApps-Samples/tree/master/cds/orgsvc/C%23/CreateRetrieveEntityRelationships).
2321

2422
<a name="BKMK_Create1NEntityRelationship"></a>
23+
2524
## Create a 1:N entity relationship
25+
2626
The following sample uses the [EligibleCreateOneToManyRelationship](#eligiblecreateonetomanyrelationship) method to verify that the `Account` and `Campaign` entities can participate in a 1:N entity relationship and then creates the entity relationship by using <xref:Microsoft.Xrm.Sdk.Messages.CreateOneToManyRequest>.
2727

2828
```csharp
@@ -68,7 +68,7 @@ if (eligibleCreateOneToManyRelationship)
6868

6969

7070
CreateOneToManyResponse createOneToManyRelationshipResponse =
71-
(CreateOneToManyResponse)_serviceProxy.Execute(
71+
(CreateOneToManyResponse)service.Execute(
7272
createOneToManyRelationshipRequest);
7373

7474
_oneToManyRelationshipId =
@@ -106,7 +106,7 @@ public bool EligibleCreateOneToManyRelationship(string referencedEntity,
106106
};
107107

108108
CanBeReferencedResponse canBeReferencedResponse =
109-
(CanBeReferencedResponse)_serviceProxy.Execute(canBeReferencedRequest);
109+
(CanBeReferencedResponse)service.Execute(canBeReferencedRequest);
110110

111111
if (!canBeReferencedResponse.CanBeReferenced)
112112
{
@@ -123,7 +123,7 @@ public bool EligibleCreateOneToManyRelationship(string referencedEntity,
123123
};
124124

125125
CanBeReferencingResponse canBeReferencingResponse =
126-
(CanBeReferencingResponse)_serviceProxy.Execute(canBereferencingRequest);
126+
(CanBeReferencingResponse)service.Execute(canBereferencingRequest);
127127

128128
if (!canBeReferencingResponse.CanBeReferencing)
129129
{
@@ -189,7 +189,7 @@ if (accountEligibleParticipate && campaignEligibleParticipate)
189189
};
190190

191191
CreateManyToManyResponse createManytoManyRelationshipResponse =
192-
(CreateManyToManyResponse)_serviceProxy.Execute(
192+
(CreateManyToManyResponse)service.Execute(
193193
createManyToManyRelationshipRequest);
194194

195195

@@ -224,7 +224,7 @@ public bool EligibleCreateManyToManyRelationship(string entity)
224224
};
225225

226226
CanManyToManyResponse canManyToManyResponse =
227-
(CanManyToManyResponse)_serviceProxy.Execute(canManyToManyRequest);
227+
(CanManyToManyResponse)service.Execute(canManyToManyRequest);
228228

229229
if (!canManyToManyResponse.CanManyToMany)
230230
{
@@ -248,15 +248,15 @@ public bool EligibleCreateManyToManyRelationship(string entity)
248248
RetrieveRelationshipRequest retrieveOneToManyRequest =
249249
new RetrieveRelationshipRequest { MetadataId = _oneToManyRelationshipId };
250250
RetrieveRelationshipResponse retrieveOneToManyResponse =
251-
(RetrieveRelationshipResponse)_serviceProxy.Execute(retrieveOneToManyRequest);
251+
(RetrieveRelationshipResponse)service.Execute(retrieveOneToManyRequest);
252252

253253
Console.WriteLine("Retrieved {0} One-to-many relationship by id", retrieveOneToManyResponse.RelationshipMetadata.SchemaName);
254254

255255
//Retrieve the Many-to-many relationship using the Name.
256256
RetrieveRelationshipRequest retrieveManyToManyRequest =
257257
new RetrieveRelationshipRequest { Name = _manyToManyRelationshipName};
258258
RetrieveRelationshipResponse retrieveManyToManyResponse =
259-
(RetrieveRelationshipResponse)_serviceProxy.Execute(retrieveManyToManyRequest);
259+
(RetrieveRelationshipResponse)service.Execute(retrieveManyToManyRequest);
260260

261261
Console.WriteLine("Retrieved {0} Many-to-Many relationship by Name", retrieveManyToManyResponse.RelationshipMetadata.MetadataId);
262262
```

powerapps-docs/developer/common-data-service/org-service/samples/create-retrieve-outlook-filters.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ Checks for the current version of the org.
3636

3737
### Demonstrate
3838

39-
The `SavedQuery` method creates and retrieves the offline filter. In your Outlook client , this will appear in the System filters tab under **File** > **CRM** > **Synchronize** > **Outlook Filters**.
39+
1. The `fetchXml` method creates asn retrieves offline filter. In your Outlook client, this will appear in System Filters tab under **File -> CRM -> Synchronize -> Outlook Filters**.
40+
2. The `InstantiateFiltersRequest` method activates the selected offline templates for the current user.
41+
3. The `ResetUserFilterRequest` method resets the current user's offline templates to the defaults.
4042

4143
### Clean up
4244

43-
No Clean up is required for this sample.
45+
Display an option to delete the sample data that is created in [Setup](#setup). The deletion is optional in case you want to examine the entities and data created by the sample. You can manually delete the records to achieve the same result.
4446

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: " Download report definition (Common Data Service) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
3+
description: "This sample showcases how to download report definition" # 115-145 characters including spaces. This abstract displays in the search result.
4+
ms.custom: ""
5+
ms.date: 12/20/2019
6+
ms.reviewer: ""
7+
ms.service: powerapps
8+
ms.topic: "samples"
9+
author: "JimDaly" # GitHub ID
10+
ms.author: "jdaly" # MSFT alias of Microsoft employees only
11+
manager: "ryjones" # MSFT alias of manager or PM counterpart
12+
search.audienceType:
13+
- developer
14+
search.app:
15+
- PowerApps
16+
- D365CE
17+
---
18+
19+
20+
# Download report definition
21+
22+
This sample shows how to download a report definition (.rdl) file by using the [DownloadReportDefinitionRequest](https://docs.microsoft.com/dotnet/api/microsoft.crm.sdk.messages.downloadreportdefinitionrequest?view=dynamics-general-ce-9) message. You can download the sample from [here](https://github.com/microsoft/PowerApps-Samples/tree/master/cds/orgsvc/C%23/DownloadReportDefinition).
23+
24+
## How to run this sample
25+
26+
[!include[cc-how-to-run-samples](../../includes/cc-how-to-run-samples.md)]
27+
28+
## What this sample does
29+
30+
The `DownloadReportDefinitionRequest` message is intended to be used in a scenario where it contains the data that is needed to download a report definition.
31+
32+
## How this sample works
33+
34+
In order to simulate the scenario described in [What this sample does](#what-this-sample-does), the sample will do the following:
35+
36+
### Setup
37+
38+
Checks for the current version of the org.
39+
40+
### Demonstrate
41+
42+
1. The `QueryByAttribute` method queries for an existing report.
43+
2. The `DownloadReportDefinitionRequest` method downloads the report definition.
44+
45+
### Clean up
46+
47+
Display an option to delete the sample data that is created in [Setup](#setup). The deletion is optional in case you want to examine the entities and data created by the sample. You can manually delete the records to achieve the same result.

0 commit comments

Comments
 (0)