Skip to content

Commit

Permalink
Merge pull request #411 from microsoft/release/update/231108121549
Browse files Browse the repository at this point in the history
Resync from mainline.
  • Loading branch information
MattB-msft authored Nov 8, 2023
2 parents 521ee7d + 84ca155 commit 284c3c2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ public FileBackedTokenCacheHints(string tokenPathAndFileName)
if (AppDomain.CurrentDomain != null)
{
hostName = Path.GetFileNameWithoutExtension(AppDomain.CurrentDomain.FriendlyName);
if (hostName.IndexOfAny(Path.GetInvalidFileNameChars()) < 0)
{
foreach (var c in Path.GetInvalidFileNameChars())
{
hostName = hostName.Replace(c, '_');
}
}
}
string hostVersion = Environs.XrmSdkFileVersion;
string companyName = typeof(OrganizationDetail).Assembly.GetCustomAttribute<AssemblyCompanyAttribute>().Company;
Expand Down
5 changes: 5 additions & 0 deletions src/GeneralTools/DataverseClient/Client/ConnectionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1750,6 +1750,9 @@ private async Task RefreshInstanceDetails(IOrganizationService dvService, Uri ur
_OrgDetail.UniqueName = resp.Detail.UniqueName;
_OrgDetail.UrlName = resp.Detail.UrlName;
_OrgDetail.DatacenterId = resp.Detail.DatacenterId;
_OrgDetail.SchemaType = resp.Detail.SchemaType;
_OrgDetail.OrganizationType = resp.Detail.OrganizationType;

}
_organization = _OrgDetail.UniqueName;

Expand Down Expand Up @@ -3007,6 +3010,8 @@ private static async Task<OrganizationDetailCollection> QueryGlobalDiscoveryAsyn
d.EnvironmentId = !string.IsNullOrEmpty(inst.EnvironmentId) ? inst.EnvironmentId : string.Empty;
d.Geo = !string.IsNullOrEmpty(inst.Region) ? inst.Region : string.Empty;
d.TenantId = !string.IsNullOrEmpty(inst.TenantId) ? inst.TenantId : string.Empty;
d.SchemaType = !string.IsNullOrEmpty(inst.SchemaType) ? inst.SchemaType : string.Empty;
d.OrganizationType = (Xrm.Sdk.Organization.OrganizationType)Enum.Parse(typeof(Xrm.Sdk.Organization.OrganizationType), inst.OrganizationType.ToString());
System.Reflection.PropertyInfo proInfo = d.GetType().GetProperty("Endpoints");
if (proInfo != null)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Newtonsoft.Json;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -49,7 +49,7 @@ internal class GlobalDiscoveryInstanceModel
public DateTime TrialExpirationDate { get; set; }
[JsonProperty(PropertyName = "Purpose")]
public string Purpose { get; set; }


}
[JsonProperty(PropertyName = "SchemaType")]
public string SchemaType { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/GeneralTools/DataverseClient/Client/Utils/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ internal static DiscoveryServer GetDiscoveryServerByUri(Uri orgUri)
using (DiscoveryServers discoSvcs = new DiscoveryServers())
{
return discoSvcs.GetServerByShortName(OnlineRegon);
};
}
}
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Notice:
++CURRENTRELEASEID++
Updated Core SDK
Added new properties to Organization detail to report Schema Type and Deployment Type.
Fixed bug in creating file to user token cache when host name contains invalid characters. Fixes #406
Dependency changes:
System.Text.Json moved to 7.0.3
Microsoft.Identity.Client moved to 4.56.0
Expand Down

0 comments on commit 284c3c2

Please sign in to comment.