Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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