Forum Discussion
EinmalIM
Apr 26, 2021Brass Contributor
SharePoint Online responds with HTTP 400 bad request from time to time since April 16, 2021
We are using CSOM to communicate with SharePoint Online. Since April 16th, 2021 we recognize http 400 responses from different parts of our code using CSOM calls from time to time. We added statu...
Enric Carrión
May 07, 2021Brass Contributor
Hey! Same here, many of our tenants suffer from the same HTTP 400 errors since approx. that date. We even used the same workaround to retry the CSOM calls, leveraging the retry mechanism for throttling. It seems to work but... people from MS, is this the right way?
Let me add more info to this. Since those dates, apart from the HTTP 400 errors with CSOM, we've also started to experience many other errors in these same tenants, in many different situations:
- Several times loading a SharePoint site collection in the browser (even before authenticating) shows an ASP.NET error.
- OAuth negotiation for SharePoint add-ins returns 403 many times.
- SharePoint Online PowerShell CMDlets are returning frequent "Unknown Error"'s:
- When retrieving site collections (Get-SPOSite)
- When adding users (Add-SPOUser)
All this happens very frequently but none of it is reproducible with a specific set of steps. It happens sometimes (and when it happens, it seems to get stuck on it) and sometimes it doesn't.
Did MS do any SPO updates during those dates? Could someone provide any other insights? Thank you!!
Let me add more info to this. Since those dates, apart from the HTTP 400 errors with CSOM, we've also started to experience many other errors in these same tenants, in many different situations:
- Several times loading a SharePoint site collection in the browser (even before authenticating) shows an ASP.NET error.
- OAuth negotiation for SharePoint add-ins returns 403 many times.
- SharePoint Online PowerShell CMDlets are returning frequent "Unknown Error"'s:
- When retrieving site collections (Get-SPOSite)
- When adding users (Add-SPOUser)
All this happens very frequently but none of it is reproducible with a specific set of steps. It happens sometimes (and when it happens, it seems to get stuck on it) and sometimes it doesn't.
Did MS do any SPO updates during those dates? Could someone provide any other insights? Thank you!!
SurajKumbhar
May 20, 2021Copper Contributor
We are facing issue recently at below line in TokenHelper which raise in exception mentioned below the url. Till end of april 2021 it was working fine.
webClient.DownloadData(acsMetadataEndpointUrlWithRealm);
acsMetadataEndpointUrlWithRealm url like this :
https://accounts.accesscontrol.windows.net/metadata/json/1?realm=https://sample.sharepoint.com
Exception:
System.Net.WebException
HResult=0x80131509
Message=The remote server returned an error: (400) Bad Request. - {"error":"invalid_request","error_description":"AADSTS90002: Tenant 'https://sample.sharepoint.com' not found. This may happen if there are no active subscriptions for the tenant. Check to make sure you have the correct tenant ID.
webClient.DownloadData(acsMetadataEndpointUrlWithRealm);
acsMetadataEndpointUrlWithRealm url like this :
https://accounts.accesscontrol.windows.net/metadata/json/1?realm=https://sample.sharepoint.com
Exception:
System.Net.WebException
HResult=0x80131509
Message=The remote server returned an error: (400) Bad Request. - {"error":"invalid_request","error_description":"AADSTS90002: Tenant 'https://sample.sharepoint.com' not found. This may happen if there are no active subscriptions for the tenant. Check to make sure you have the correct tenant ID.