Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace: microsoft.graph
Get the directory objects that a user sponsors. Sponsored objects can include users, agent users, agent blueprints, agent blueprint principals, and agent identities. Because a group can also be a sponsor, the response includes both objects the user directly sponsors and objects the user sponsors through group membership.
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 permissions | Higher privileged permissions |
|---|---|---|
| Delegated (work or school account) | User.Read | User.Read.All, User.ReadWrite.All |
| Delegated (personal Microsoft account) | Not supported. | Not supported. |
| Application | Not supported. | Not supported. |
HTTP request
GET /me/sponsorOf
GET /users/{id | userPrincipalName}/sponsorOf
Optional query parameters
This method supports the $filter, $count, $select, $expand, $top, and $skip OData query parameters to help customize the response.
Request headers
| Header | Value |
|---|---|
| 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 collection of directoryObject objects in the response body.
Examples
Example 1: List all entities that a user sponsors
Request
The following example shows a request.
GET https://graph.microsoft.com/v1.0/users/025e5e3e-e5b7-4eb4-ba1f-4e5b0579f1a2/sponsorOf
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
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects",
"value": [
{
"@odata.type": "#microsoft.graph.user",
"id": "87d349ed-44d7-43e1-9a83-5f2406dee5bd",
"displayName": "Guest User 1",
"userPrincipalName": "guestuser1_example.com#EXT#@contoso.onmicrosoft.com",
"userType": "Guest"
},
{
"@odata.type": "#microsoft.graph.user",
"id": "2fe96d23-5dc6-4f35-8222-0426a8c115c6",
"displayName": "Guest User 2",
"userPrincipalName": "guestuser2_example.com#EXT#@contoso.onmicrosoft.com",
"userType": "Guest"
}
]
}
Example 2: List all entities that a user sponsors, filtered by type
Request
The following example shows a request that filters the sponsored objects by user type.
GET https://graph.microsoft.com/v1.0/users/025e5e3e-e5b7-4eb4-ba1f-4e5b0579f1a2/sponsorOf?$filter=microsoft.graph.user/userType eq 'Guest'
ConsistencyLevel: eventual
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
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects",
"value": [
{
"@odata.type": "#microsoft.graph.user",
"id": "87d349ed-44d7-43e1-9a83-5f2406dee5bd",
"displayName": "Guest User 1",
"userPrincipalName": "guestuser1_example.com#EXT#@contoso.onmicrosoft.com",
"userType": "Guest"
}
]
}