Important This section contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
Problem exists for all users
Step 1: Verify firewall settings
If you have a firewall that supports the following features, make sure that these features are disabled.
Note This step applies to Forefront Threat Management Gateway (TMG) server. However, be aware that other firewall servers may also support these features.
Step 2: Update federation settings for the federated domain
- Start the Microsoft Online Services Identity Federation Management tool from the desktop on the computer on which it was installed.
- At the Windows PowerShell prompt, type the following, and then press Enter:
$cred=Get-Credential
- When you are prompted, type your Office 365 Global Administrator account.
- At the Windows PowerShell prompt, type the following, and then press ENTER:
Set-MSOLContextCredential -MSOLAdminCredentials $cred
- Run the following Update-MSOLFederatedDomain cmdlet:
Update-MSOLFederatedDomain �DomainName yourdomain.com
Step 3: Repair the Relying Party Trust entity
- Click Start, click Control Panel, point to Administrative Tools, and then click AD FS 2.0 Management.
- Locate Trust Relationships, select Relying Party Trusts, and then click Delete to remove the Relying Party Trust entry.
- Start the Microsoft Online Services Identity Federation Management tool from the desktop on the computer on which it was installed.
- At the Windows PowerShell prompt, type the following, and then press ENTER:
$cred=Get-Credential
- When you are prompted, type your online administrator account.
- At the Windows PowerShell prompt, type the following, and then press ENTER:
Set-MSOLContextCredential -MSOLAdminCredentials $cred
- Run the Add-MSOLFederatedDomain cmdlet to re-create the federation trust.
Note If your domain is already configured as an online federated domain, you receive an error. However, this Windows PowerShell cmdlet re-creates the required AD FS entries, such as the following:
- Relying Party Trusts = Microsoft Federation Gateway
- Issuance Transform Rules = two rules created
- Run the Update-MSOLFederatedDomain cmdlet.
Problem exists for one or some users
Step 1: Check whether the user's proxy addresses contains non-ASCII characters
Review the user's on-premises proxy addresses for non-ASCII characters. If non-ASCII characters are found, update the proxy address for the user to only contain ASCII characters.
For more information about ASCII characters, see the following website: http://www.asciitable.com
Step 2: Resolve a changed user principal name (UPN) or SAM Account name situation for the problem user
After a user signs in to Office 365, the sign-in information may be cached on the AD FS server. When the user principal name (UPN) or the Security Accounts Manager (SAM) account of the user is changed, problems may occur the next time that the user tries to access Office 365 services. There are some steps that can be taken to resolve this issue.
- Verify that the UPN changes are synchronized to Office 365 through directory synchronization.
- Have the user log off the computer and then log back on.
- If steps 1 and 2 do not resolve the issue, restart the AD FS server. Or, follow these steps:
- Open Registry Editor, and then locate the following subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
- Right-click the LSA subkey folder, select New, and then select DWORD Value.
- Type LsaLookupCacheMaxSize, and then press Enter.
- Right-click LsaLookupCacheMaxSize, and then click Modify.
- In the Value data box, type 0, and then click OK.
- Exit Registry Editor.
Note LsaLookupCacheMaxSize can affect sign-in performance. Therefore, we recommend that you delete LsaLookupCacheMaxSize when the issue is resolved.