-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
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.