Skip to content

Latest commit

 

History

History
137 lines (105 loc) · 4.28 KB

File metadata and controls

137 lines (105 loc) · 4.28 KB
title List invitedBy
description Get the user or service principal that invited the specified user into the tenant.
author sponnada
ms.localizationpriority medium
ms.subservice entra-users
doc_type apiPageType
ms.date 05/28/2024

List invitedBy

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Get the user or servicePrincipal that invited the specified user into the tenant.

[!INCLUDE national-cloud-support]

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.

[!INCLUDE permissions-table]

HTTP request

GET /me/invitedBy
GET /users/{userId}/invitedBy

[!INCLUDE me-apis-sign-in-note]

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a single directoryObject in the response body.

Examples

Request

The following example shows a request.

GET https://graph.microsoft.com/beta/users/37b16a99-97fe-47fe-9a58-4257059b3463/invitedBy

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-Type: application/json

{
    "value": [
    {
       "@odata.type": "#microsoft.graph.user",
       "displayName": "Adele Vance",
       "givenName": "Adele",
       "jobTitle": "Retail Manager",
       "mail": "AdeleV@contoso.com",
       "mobilePhone": "+1 425 555 0109",
       "officeLocation": "18/2111",
       "preferredLanguage": "en-US",
       "surname": "Vance",
       "invitedBy": "93636d4a-4d22-4f76-841f-1d4c7ca7de9d",
       "userPrincipalName": "AdeleV@contoso.com",
       "id": "87d349ed-44d7-43e1-9a83-5f2406dee5bd"
    }
    ]
}