You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Undocumented breaking change for 3.0.0: serverRelativeUrl properties changed to server_relative_url #1037
In all places, sharepoint file and folder property .serverRelativeUrl is changed to .server_relative_url, breaking many existing flows (that work fine in 2.6.2) with errors similar to: AttributeError: 'File' object has no attribute 'serverRelativeUrl' in version 3.0.0
This is not listed as a breaking change in the release notes, nor there was any deprecation notice in prior versions.
Also, the change is (probably) not reflected in type stubs and the linters fail to recognize the new .server_relative_url property.
You are right on both counts that matter: 3.0.0 did rename these properties, and it was never listed as a breaking change. That gap is now fixed in the repo (6973b3a13):
The rename added to the 3.0.0 → Breaking list in CHANGELOG.md, where someone moving from 2.x will actually look
The mapping is mechanical: take the OData key, lowercase the first letter, _ before each capital. 628 properties moved this way.
2.x
3.x
file.serverRelativeUrl
file.server_relative_url
file.timeCreated
file.time_created
folder.listItemAllFields
folder.list_item_all_fields
list.contentTypes
list.content_types
web.allProperties
web.all_properties
Only the Python attribute moved — the wire keys did not, so these still work:
file.properties["ServerRelativeUrl"] # raw payload valuefile.get_property("ServerRelativeUrl") # returns file.server_relative_urlfile.ensure_property("ServerRelativeUrl") # request the wire name explicitlylist_obj.items.select(["Id", "ServerRelativeUrl"]) # $select/$expand take wire names
On the type-stub point: I checked that too, and the new name does type-check. The property is an ordinary typed @property, not an __getattr__ fallback — pyright reports 0 errors on file.server_relative_url and correctly errors on file.serverRelativeUrl:
error: Cannot access attribute "serverRelativeUrl" for class "File"
Attribute "serverRelativeUrl" is unknown (reportAttributeAccessIssue)
So the linter message you saw is accurate rather than a stub gap — which makes it the fastest way to migrate: run pyright/mypy over your code, and each stale access is reported with its class. The new page documents that trick.
No camelCase aliases shipped in 3.x (the old names raise AttributeError by design), so if a codebase can't be migrated yet, pin office365-rest-python-client==2.6.2. Thanks for pushing on the documentation side of this — the omission was real.
Activity
office365-maintainer commentedon Oct 18, 2026
You are right on both counts that matter: 3.0.0 did rename these properties, and it was never listed as a breaking change. That gap is now fixed in the repo (
6973b3a13):CHANGELOG.md, where someone moving from 2.x will actually lookThe mapping is mechanical: take the OData key, lowercase the first letter,
_before each capital. 628 properties moved this way.file.serverRelativeUrlfile.server_relative_urlfile.timeCreatedfile.time_createdfolder.listItemAllFieldsfolder.list_item_all_fieldslist.contentTypeslist.content_typesweb.allPropertiesweb.all_propertiesOnly the Python attribute moved — the wire keys did not, so these still work:
On the type-stub point: I checked that too, and the new name does type-check. The property is an ordinary typed
@property, not an__getattr__fallback —pyrightreports 0 errors onfile.server_relative_urland correctly errors onfile.serverRelativeUrl:So the linter message you saw is accurate rather than a stub gap — which makes it the fastest way to migrate: run
pyright/mypyover your code, and each stale access is reported with its class. The new page documents that trick.No camelCase aliases shipped in 3.x (the old names raise
AttributeErrorby design), so if a codebase can't be migrated yet, pinoffice365-rest-python-client==2.6.2. Thanks for pushing on the documentation side of this — the omission was real.docs: name the 3.0.0 property rename as breaking, and show the migrat…