<PackageReference Include="Microsoft.Identity.Client" Version="4.84.1" />

Microsoft.Identity.Client.ManagedIdentity.V2.MsiCertificateFriendlyNameEncoder

Encodes/decodes the X.509 FriendlyName used by MSAL for mTLS-bound certificates. Best-effort only: methods are non-throwing so certificate persistence never blocks auth.
public const string Prefix = "MSAL|"

public const string TagAlias = "alias"

public const string TagEp = "ep"

public static bool TryDecode(string friendlyName, out string alias, out string endpointBase)

Decodes friendly name into alias and endpointBase. Returns false on invalid input. We do not want to throw from here. Because persistent store is best-effort.

public static bool TryEncode(string alias, string endpointBase, out string friendlyName)

Encodes alias and endpointBase into friendly name. Returns false on invalid input. We do not want to throw from here. Because persistent store is best-effort.