Edit

Share via


storyline: unfollow

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Stop following a user's storyline. Removes the specified user from the signed-in user's following list.

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permission Higher privileged permissions
Delegated (work or school account) Storyline.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application Storyline.ReadWrite.All Not available.

HTTP request

POST /users/{user-id}/employeeExperience/storyline/unfollow

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the parameters.

For delegated permissions (user context), leave the request body empty:

{}

For application permissions (app-only context), provide the following parameter:

Parameter Type Description
unfollowBy engagementIdentitySet The identity information of the user who is unfollowing. Required for application permissions.

Response

If successful, this action returns a 204 No Content response code.

Examples

Example 1: Unfollow a user with delegated permissions

The following example shows how to unfollow a user using delegated permissions.

Request

POST https://graph.microsoft.com/beta/users/f2a84916-d735-41d9-a04a-4ecf6266ae71/employeeExperience/storyline/unfollow
Content-Type: application/json

{}

Response

HTTP/1.1 204 No Content

Example 2: Unfollow a user with application permissions

The following example shows how to unfollow a user using application permissions.

Request

POST https://graph.microsoft.com/beta/users/b3c29da7-ff83-4a92-b14e-7c91fe830b96/employeeExperience/storyline/unfollow
Content-Type: application/json

{
  "unfollowBy": {
    "user": {
      "id": "e7f439cd-2e84-4b15-a903-f6d82a7b9c21"
    }
  }
}

Response

HTTP/1.1 204 No Content