Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharepoint Online REST strange error (400) #6281

Open
1 task done
slavag opened this issue Sep 15, 2020 · 10 comments
Open
1 task done

Sharepoint Online REST strange error (400) #6281

slavag opened this issue Sep 15, 2020 · 10 comments
Labels
area:csom/rest/api Category: SharePoint Client Side Object Model SDK / REST API status:to-be-reviewed Issue needs to be reviewed by Microsoft for additional follow up / review.

Comments

@slavag
Copy link

slavag commented Sep 15, 2020

Category

  • Bug

Describe the bug

Since Sep 9, 2020 we started to get strange error on REST API call to get list of sub-sites and their lists:

GET <site url>_api/web?$expand=webs,lists,AllProperties,ThemeInfo,SiteUsers,RoleDefinitions&$select=*,webs/Url,lists/Id,lists/Title,lists/Description,lists/BaseType,lists/BaseTemplate,lists/Hidden,lists/Language,lists/ItemCount,lists/Created,lists/TemplateFeatureId,lists/CurrentChangeToken,SiteUsers/id,SiteUsers/Title,SiteUsers/LoginName,AllProperties/DesignPreviewThemedCssFolderUrl

The API call was working already for few year but something is broken now and in many our customers (not all , but few thousands of Sharepoint online tenants) we see this error.

{"error":{"code":"-2147467261, System.ArgumentNullException","message":{"lang":"en-US","value":"Value cannot be null.Parameter name: key"}}}

Now, we don't ask for any parameter "key", so not sure why it's null, but I found that if I remove the last part
AllProperties/DesignPreviewThemedCssFolderUrl
And request now looks :

GET <site url>_api/web?$expand=webs,lists,AllProperties,ThemeInfo,SiteUsers,RoleDefinitions&$select=*,webs/Url,lists/Id,lists/Title,lists/Description,lists/BaseType,lists/BaseTemplate,lists/Hidden,lists/Language,lists/ItemCount,lists/Created,lists/TemplateFeatureId,lists/CurrentChangeToken,SiteUsers/id,SiteUsers/Title,SiteUsers/LoginName

Then this request is returns fine, without any error

Expected behavior

GET <site url>_api/web?$expand=webs,lists,AllProperties,ThemeInfo,SiteUsers,RoleDefinitions&$select=*,webs/Url,lists/Id,lists/Title,lists/Description,lists/BaseType,lists/BaseTemplate,lists/Hidden,lists/Language,lists/ItemCount,lists/Created,lists/TemplateFeatureId,lists/CurrentChangeToken,SiteUsers/id,SiteUsers/Title,SiteUsers/LoginName,AllProperties/DesignPreviewThemedCssFolderUrl

The original API call should not return that error, or at least notifies how it can be resolved.

Environment details (development & target environment)

MacOS / Linux. Postman as well.

Additional context

This API call was working for few years without any issue (once we got Invalid color XML error, on that call).

Thanks
Please advise.

@msft-github-bot
Copy link
Collaborator

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@msft-github-bot msft-github-bot added the Needs: Triage 🔍 Awaiting categorization and initial review. label Sep 15, 2020
@rjaakke
Copy link

rjaakke commented Sep 16, 2020

Same issue in CSOM when trying to load ThemeInfo on SPWeb.

SpContext.Load(spWeb, o => o.ThemeInfo);
SpContext.ExecuteQuery();

@andrewconnell andrewconnell added area:csom/rest/api Category: SharePoint Client Side Object Model SDK / REST API Needs: Attention 👋 Original poster responded to request for feedback, awaiting attention from Microsoft / community. status:to-be-reviewed Issue needs to be reviewed by Microsoft for additional follow up / review. and removed Needs: Triage 🔍 Awaiting categorization and initial review. Needs: Attention 👋 Original poster responded to request for feedback, awaiting attention from Microsoft / community. labels Sep 16, 2020
@bcameron1231
Copy link
Contributor

bcameron1231 commented Sep 16, 2020

Some additional Information to add for triage -

This may be a tenant by tenant issue... as this call is working for me on my tenants.

@slavag
Copy link
Author

slavag commented Sep 16, 2020

This happens not for all tenants, but I would say for our customers , it's hundreds and hundreds. And even in our private tenant is also happens. I can share tenant id in private if it's needed.
Thanks

@slavag
Copy link
Author

slavag commented Sep 19, 2020

@microsoft - Any progress on this ? Seems that many have this issue : bramdejager/spcb#98

@bramdejager
Copy link

I validated some conditions because I'm experiencing this on different tenants, but not all. Server/farm versions are all identical for both the ones working and not working.

@rjaakke it seems it is not connected to a particular property or object. You experienced this with ThemeInfo and in the SPCB tool it triggered with Site.RootWeb.CurrentUser it seems. And if I leave out this check, then the next statement is on the Web will trigger the error.

Clearly the issue came up after September 9th. See timeline of the issues below.
image

@slavag
Copy link
Author

slavag commented Sep 21, 2020

In my case it REST call, started on Sep 9 as well, but I did a workaround , removed AllProperties/DesignPreviewThemedCssFolderUrl from the select statement

@rjaakke
Copy link

rjaakke commented Sep 21, 2020

@bramdejager In our Provisioning tool we load a large portion of the available properties (that have a setter) in a single call.
The ThemeInfo object is wat caused the issue there. Because we only needed themeBackgroundImageUri from the ThemeInfo object we now load ThemeInfo.ThemeBackgroundImageUri instead and it solved the issue.

It could be that this is somehow related to expanding of objects in the API. This would explain why we see this issue loading different types of objects.

@slavag
Copy link
Author

slavag commented Sep 26, 2020

@andrewconnell @bcameron1231 Is someone at Microsoft can have a look on this issue ? Thanks

@bramdejager
Copy link

bramdejager commented Sep 26, 2020

@slavag Check out the issue98 for the SPCB tool referenced earlier in this thread. You see a response from Microsoft in there by Bert. They have an internal thread on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:csom/rest/api Category: SharePoint Client Side Object Model SDK / REST API status:to-be-reviewed Issue needs to be reviewed by Microsoft for additional follow up / review.
Projects
None yet
Development

No branches or pull requests

6 participants