public static LicenseIdentity GetLicenseIdentity(RmsClientManagerContext context, string recipientAddress)
        {
            ArgumentValidator.ThrowIfNull("context", context);
            ArgumentValidator.ThrowIfNullOrEmpty("recipientAddress", recipientAddress);
            ADRawEntry adrawEntry;

            try
            {
                adrawEntry = context.ResolveRecipient(recipientAddress);
            }
            catch (ADTransientException innerException)
            {
                throw new ExchangeConfigurationException(ServerStrings.FailedToReadUserConfig(recipientAddress), innerException);
            }
            catch (ADOperationException innerException2)
            {
                throw new RightsManagementException(RightsManagementFailureCode.ADUserNotFound, ServerStrings.FailedToReadUserConfig(recipientAddress), innerException2);
            }
            if (adrawEntry == null)
            {
                throw new RightsManagementException(RightsManagementFailureCode.ADUserNotFound, ServerStrings.FailedToReadUserConfig(recipientAddress));
            }
            List <string> federatedEmailAddresses = RmsClientManagerUtils.GetFederatedEmailAddresses(context.OrgId, (ProxyAddressCollection)adrawEntry[ADRecipientSchema.EmailAddresses]);

            if (federatedEmailAddresses.Count == 0)
            {
                RmsClientManager.TraceFail(null, context.SystemProbeId, "GetLicenseIdentity: User {0} doesn't have any SMTP proxy address from a domain that is federated.", new object[]
                {
                    recipientAddress
                });
                throw new RightsManagementException(RightsManagementFailureCode.ADUserNotFederated, DirectoryStrings.UserHasNoSmtpProxyAddressWithFederatedDomain);
            }
            return(new LicenseIdentity(federatedEmailAddresses[0], federatedEmailAddresses.ToArray()));
        }