Skip to content

Investigate whether we support entity reference deletion #243

@MIchaelMainer

Description

@MIchaelMainer

From 11.4.6.2 Remove a Reference to an Entity:

A successful DELETE request to the URL that represents a reference to a related entity removes the relationship to that entity.

In OData 4.0, the entity reference to be removed within a collection-valued navigation property is the URL that represents the collection of related references, with the reference to be removed identified by the $id query option. OData 4.01 services additionally support using the URL that represents the reference of the collection member to be removed, identified by key, as described in [OData‑URL].

For single-valued navigation properties, the $id query option MUST NOT be specified.

The DELETE request MUST NOT violate any integrity constraints in the data model.

On successful completion, the response MUST be 204 No Content and contain an empty body.

We have the following metadata:

<EntityType Name="group" BaseType="graph.directoryObject" OpenType="true"
  <NavigationProperty Name="acceptedSenders" Type="Collection(graph.directoryObject)" ContainsTarget="true" />
  <NavigationProperty Name="rejectedSenders" Type="Collection(graph.directoryObject)" ContainsTarget="true" />
</EntityType>

We are certain that the definition is incorrect as the documentation shows this to be a reference when adding an acceptedSender.

For removing a reference, we will need to support:

DELETE /groups/{id}/acceptedSenders/$ref?$id=https://graph.microsoft.com/v1.0/users/{user-id}

@zengin
AB#7084

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions