python-o365
python-o365 copied to clipboard
get_lists does not provide access to system lists
Sharepoint uses system lists for Site Pages, Site Assets, etc. These lists are currently inaccessible via O365.
According to this documentation: https://learn.microsoft.com/en-us/graph/api/list-list?view=graph-rest-1.0&tabs=http and this SO response: https://stackoverflow.com/a/47563009/12194489:
Lists with the system facet are hidden by default. To list them, include system in your $select statement.
I propose adding a include_system=False parameter to the Site.get_lists method, that would do result in the equivalent of self.con.get(self.build_url("/lists?select=weburl,system" )) to be requested.
Please send a PR with your proposed changes.
Thanks