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 about 30%) 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
@Sharepoint team, maybe some new versions was deployed and some behaviour changes / bugs were introduced ? Please advise, Thanks