internal static FederatedIdentity GetFederatedIdentity(IFederatedIdentityParameters parameters)
        {
            OrganizationId           organizationId           = parameters.OrganizationId ?? OrganizationId.ForestWideOrgId;
            OrganizationIdCacheValue organizationIdCacheValue = OrganizationIdCache.Singleton.Get(organizationId);
            FederatedIdentity        federatedIdentity;

            if (organizationId.ConfigurationUnit == null)
            {
                ExTraceGlobals.FederatedIdentityTracer.TraceDebug <ADObjectId>(0L, "Handling user '{0}' as enterprise user.", parameters.ObjectId);
                federatedIdentity = FederatedIdentityHelper.GetFederatedIdentityForEnterprise(organizationIdCacheValue, parameters);
            }
            else
            {
                ExTraceGlobals.FederatedIdentityTracer.TraceDebug <ADObjectId>(0L, "Handling user '{0}' as tenant user.", parameters.ObjectId);
                federatedIdentity = FederatedIdentityHelper.GetFederatedIdentityForTenant(organizationIdCacheValue, parameters);
            }
            ExTraceGlobals.FederatedIdentityTracer.TraceDebug <ADObjectId, FederatedIdentity>(0L, "Federated identity for user '{0}' is: {1}", parameters.ObjectId, federatedIdentity);
            return(federatedIdentity);
        }
 internal FederatedIdentity GetFederatedIdentity()
 {
     return(FederatedIdentityHelper.GetFederatedIdentity(this));
 }