Skip to content

Commit 284c3c2

Browse files
authored
Merge pull request #411 from microsoft/release/update/231108121549
Resync from mainline.
2 parents 521ee7d + 84ca155 commit 284c3c2

File tree

5 files changed

+18
-5
lines changed

5 files changed

+18
-5
lines changed

src/GeneralTools/DataverseClient/Client/Auth/TokenCache/FileBackedTokenCacheHints.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ public FileBackedTokenCacheHints(string tokenPathAndFileName)
3737
if (AppDomain.CurrentDomain != null)
3838
{
3939
hostName = Path.GetFileNameWithoutExtension(AppDomain.CurrentDomain.FriendlyName);
40+
if (hostName.IndexOfAny(Path.GetInvalidFileNameChars()) < 0)
41+
{
42+
foreach (var c in Path.GetInvalidFileNameChars())
43+
{
44+
hostName = hostName.Replace(c, '_');
45+
}
46+
}
4047
}
4148
string hostVersion = Environs.XrmSdkFileVersion;
4249
string companyName = typeof(OrganizationDetail).Assembly.GetCustomAttribute<AssemblyCompanyAttribute>().Company;

src/GeneralTools/DataverseClient/Client/ConnectionService.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,6 +1750,9 @@ private async Task RefreshInstanceDetails(IOrganizationService dvService, Uri ur
17501750
_OrgDetail.UniqueName = resp.Detail.UniqueName;
17511751
_OrgDetail.UrlName = resp.Detail.UrlName;
17521752
_OrgDetail.DatacenterId = resp.Detail.DatacenterId;
1753+
_OrgDetail.SchemaType = resp.Detail.SchemaType;
1754+
_OrgDetail.OrganizationType = resp.Detail.OrganizationType;
1755+
17531756
}
17541757
_organization = _OrgDetail.UniqueName;
17551758

@@ -3007,6 +3010,8 @@ private static async Task<OrganizationDetailCollection> QueryGlobalDiscoveryAsyn
30073010
d.EnvironmentId = !string.IsNullOrEmpty(inst.EnvironmentId) ? inst.EnvironmentId : string.Empty;
30083011
d.Geo = !string.IsNullOrEmpty(inst.Region) ? inst.Region : string.Empty;
30093012
d.TenantId = !string.IsNullOrEmpty(inst.TenantId) ? inst.TenantId : string.Empty;
3013+
d.SchemaType = !string.IsNullOrEmpty(inst.SchemaType) ? inst.SchemaType : string.Empty;
3014+
d.OrganizationType = (Xrm.Sdk.Organization.OrganizationType)Enum.Parse(typeof(Xrm.Sdk.Organization.OrganizationType), inst.OrganizationType.ToString());
30103015
System.Reflection.PropertyInfo proInfo = d.GetType().GetProperty("Endpoints");
30113016
if (proInfo != null)
30123017
{

src/GeneralTools/DataverseClient/Client/Model/GlobalDiscoveryModel.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Newtonsoft.Json;
1+
using Newtonsoft.Json;
22
using System;
33
using System.Collections.Generic;
44
using System.Linq;
@@ -49,7 +49,7 @@ internal class GlobalDiscoveryInstanceModel
4949
public DateTime TrialExpirationDate { get; set; }
5050
[JsonProperty(PropertyName = "Purpose")]
5151
public string Purpose { get; set; }
52-
53-
54-
}
52+
[JsonProperty(PropertyName = "SchemaType")]
53+
public string SchemaType { get; set; }
54+
}
5555
}

src/GeneralTools/DataverseClient/Client/Utils/Utils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ internal static DiscoveryServer GetDiscoveryServerByUri(Uri orgUri)
4343
using (DiscoveryServers discoSvcs = new DiscoveryServers())
4444
{
4545
return discoSvcs.GetServerByShortName(OnlineRegon);
46-
};
46+
}
4747
}
4848
}
4949
return null;

src/nuspecs/Microsoft.PowerPlatform.Dataverse.Client.ReleaseNotes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Notice:
99
++CURRENTRELEASEID++
1010
Updated Core SDK
1111
Added new properties to Organization detail to report Schema Type and Deployment Type.
12+
Fixed bug in creating file to user token cache when host name contains invalid characters. Fixes #406
1213
Dependency changes:
1314
System.Text.Json moved to 7.0.3
1415
Microsoft.Identity.Client moved to 4.56.0

0 commit comments

Comments
 (0)