-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround for corrupted or missing
@odata.id
for directory objects
We use the `@odata.id` field (`DirectoryObject.ODataId`) to reference objects for `@odata.bind` fields, e.g. when creating applications, groups, service principals, or posting new members for groups or directory roles. Two breaking changes were recently introduced in the API: 1. `@odata.id` stopped being returned for requests with `Accept: odata.metadata=minimal`. Hamilton has a fix for this in v0.32.0. 2. The format of the `@odata.id` value has changed for some tenants. Previously it was always the URI of the object, now in many cases despite the odata.json spec suggesting this should be a URI, it takes the form `directoryObject('0000...')`. This form isn't recognised by other API endpoints like applications, groups etc. To work around (2), we're manually constructing the OData ID to look like a URI. This is intended to be a temporary fix until the API stabilizes. See #588
- Loading branch information
1 parent
34fa432
commit 3873428
Showing
5 changed files
with
124 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters