Office 365 Account Store Error
System.Net.WebException: The remote server returned an error: (400) Bad Request.
EmpowerID SupportApril 05, 2021 13:44
Follow
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:
Open the Management Console and browse to
  Configuration Manager -- User Directories -- Account Stores
Select the Office 365 Account Store
In theÂ
Inventory section, select Re-Inventory
In theÂ
Reinventory box, select all check boxes and click OK
Â
Wait for the next scheduled inventory to run and verify that the error no longer occurs.
**Note**
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:Â https://docs.empowerid.com/2016/admin/connectingtodirectorysystems/connectingtooffice365.html