System.Net.WebException: The remote server returned an error: (400) Bad Request.

When adding Office 365 as an account store in EmpowerID, either during and upgrade or initial install, the following error may sometimes occur:


System.Net.WebException: The remote server returned an error: (400) Bad Request.

at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)

at System.Net.WebClient.DownloadData(Uri address)

at TheDotNetFactory.Framework.Connectors.Office365.Operations.DeltaOperations.<>c_DisplayClass6.<DifferentialQuery>b_1()

at TheDotNetFactory.Framework.Connectors.Office365.Operations.DeltaOperations.InvokeOperationWithRetry(Action operation)

at TheDotNetFactory.Framework.Connectors.Office365.Operations.DeltaOperations.DifferentialQuery(String resourceSet, String skipToken, ICollection`1 objectClassList, ICollection`1 propertyList, Boolean changesOnly)

at TheDotNetFactory.Framework.Connectors.Office365.Operations.DeltaOperations.ProcessDeltas(String deltaToken, Func`3 processResults, Action`1 nextToken, Boolean...)


To correct the issue:

1. Open the Management Console and browse to

    Configuration Manager -- User Directories -- Account Stores

2. Select the Office 365 Account Store

3. In the Inventory section, select Re-Inventory

4. In the Reinventory box, select all check boxes and click OK


5. Wait for the next scheduled inventory to run and verify that the error no longer occurs.


The default time for account store inventory is ten (10) minutes. 


For more information on connecting an Office 365 account store, please visit the EmpowerID Documentation site here:

Have more questions? Submit a request


Powered by Zendesk