|
| 1 | +--- |
| 2 | +title: "List delegators" |
| 3 | +description: "Get a list of all delegators for a user." |
| 4 | +author: "garchiro7" |
| 5 | +ms.date: 02/01/2025 |
| 6 | +ms.localizationpriority: medium |
| 7 | +ms.subservice: "cloud-communications" |
| 8 | +doc_type: apiPageType |
| 9 | +--- |
| 10 | + |
| 11 | +# List delegators |
| 12 | + |
| 13 | +Namespace: microsoft.graph |
| 14 | + |
| 15 | +[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)] |
| 16 | + |
| 17 | +Get a list of all delegators for a user. |
| 18 | + |
| 19 | +## Permissions |
| 20 | + |
| 21 | +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](/graph/permissions-overview#best-practices-for-using-microsoft-graph-permissions). For details about delegated and application permissions, see [Permission types](/graph/permissions-overview#permission-types). To learn more about these permissions, see the [permissions reference](/graph/permissions-reference). |
| 22 | + |
| 23 | +<!-- { |
| 24 | + "blockType": "permissions", |
| 25 | + "name": "callsettings-list-delegators-permissions" |
| 26 | +} |
| 27 | +--> |
| 28 | +[!INCLUDE [permissions-table](../includes/permissions/callsettings-list-delegators-permissions.md)] |
| 29 | + |
| 30 | +## HTTP request |
| 31 | + |
| 32 | +To list all delegators for the signed-in user (`/me`) or a specific user (`/users/{userId}/`): |
| 33 | + |
| 34 | +<!-- { |
| 35 | + "blockType": "ignored" |
| 36 | +} |
| 37 | +--> |
| 38 | +``` http |
| 39 | +GET /me/communications/callSettings/delegators |
| 40 | +GET /users/{userId}/communications/callSettings/delegators |
| 41 | +``` |
| 42 | + |
| 43 | +## Optional query parameters |
| 44 | + |
| 45 | +This method supports the `filter` and `count` OData query parameters to help customize the response. For general information, see [OData query parameters](/graph/query-parameters). |
| 46 | + |
| 47 | +|Scenario|Parameter|Example| |
| 48 | +|:---|:---|:---| |
| 49 | +|Get the delegators who granted the signed-in user permission to perform calls.|`$filter`|`GET /me/communications/callSettings/delegators?$filter=allowedActions/makeCalls eq true`| |
| 50 | +|Get the number of delegators configured for the signed-in user.|`$count`|`GET /me/communications/callSettings/delegators?$count=true`| |
| 51 | + |
| 52 | +## Request headers |
| 53 | + |
| 54 | +|Name|Description| |
| 55 | +|:---|:---| |
| 56 | +|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).| |
| 57 | + |
| 58 | +## Request body |
| 59 | + |
| 60 | +Don't supply a request body for this method. |
| 61 | + |
| 62 | +## Response |
| 63 | + |
| 64 | +If successful, this method returns a `200 OK` response code and a collection of [delegationSettings](../resources/delegationsettings.md) objects in the response body. |
| 65 | + |
| 66 | +## Examples |
| 67 | + |
| 68 | +### Example 1: Get all delegators |
| 69 | + |
| 70 | +The following example shows how to get all delegators for the signed-in user (`me`). |
| 71 | + |
| 72 | +#### Request |
| 73 | + |
| 74 | +The following example shows a request. |
| 75 | +<!-- { |
| 76 | + "blockType": "request", |
| 77 | + "name": "list_delegationsettings_delegators" |
| 78 | +} |
| 79 | +--> |
| 80 | +``` http |
| 81 | +GET https://graph.microsoft.com/beta/me/communications/callSettings/delegators |
| 82 | +``` |
| 83 | + |
| 84 | +#### Response |
| 85 | + |
| 86 | +The following example shows the response. |
| 87 | + |
| 88 | +>**Note:** The response object shown here might be shortened for readability. |
| 89 | +<!-- { |
| 90 | + "blockType": "response", |
| 91 | + "truncated": true, |
| 92 | + "@odata.type": "Collection(microsoft.graph.delegationSettings)" |
| 93 | +} |
| 94 | +--> |
| 95 | +``` http |
| 96 | +HTTP/1.1 200 OK |
| 97 | +Content-Type: application/json |
| 98 | +
|
| 99 | +{ |
| 100 | + "value": [ |
| 101 | + { |
| 102 | + "@odata.type": "#microsoft.graph.delegationSettings", |
| 103 | + "id": "62de48e1-a72c-40db-9193-a3bd8cf167c9", |
| 104 | + "createdDateTime": "2025-01-01T00:00:00Z", |
| 105 | + "isActive": true, |
| 106 | + "allowedActions": { |
| 107 | + "@odata.type": "microsoft.graph.delegateAllowedActions", |
| 108 | + "makeCalls": true, |
| 109 | + "receiveCalls": true, |
| 110 | + "manageCallAndDelegateSettings": true, |
| 111 | + "pickUpHeldCalls": true, |
| 112 | + "joinActiveCalls": false |
| 113 | + } |
| 114 | + }, |
| 115 | + { |
| 116 | + "@odata.type": "#microsoft.graph.delegationSettings", |
| 117 | + "id": "739cfec7-7956-409a-a1c8-a76daab23c2a", |
| 118 | + "createdDateTime": "2025-02-01T00:00:00Z", |
| 119 | + "isActive": true, |
| 120 | + "allowedActions": { |
| 121 | + "@odata.type": "microsoft.graph.delegateAllowedActions", |
| 122 | + "makeCalls": false, |
| 123 | + "receiveCalls": true, |
| 124 | + "manageCallAndDelegateSettings": true, |
| 125 | + "pickUpHeldCalls": true, |
| 126 | + "joinActiveCalls": false |
| 127 | + } |
| 128 | + } |
| 129 | + ] |
| 130 | +} |
| 131 | +``` |
| 132 | + |
| 133 | +### Example 2: Get all delegators who are able to make calls |
| 134 | + |
| 135 | +The following example shows how to get all delegators who area able to make calls. |
| 136 | + |
| 137 | +#### Request |
| 138 | + |
| 139 | +The following example shows a request. |
| 140 | + |
| 141 | +<!-- { |
| 142 | + "blockType": "request", |
| 143 | + "name": "list_delegationsettings_delegators_filter_makecalls" |
| 144 | +} |
| 145 | +--> |
| 146 | +``` http |
| 147 | +GET https://graph.microsoft.com/beta/me/communications/callSettings/delegators?filter=allowedActions/makeCalls eq true |
| 148 | +``` |
| 149 | + |
| 150 | +#### Response |
| 151 | + |
| 152 | +The following example shows the response. |
| 153 | + |
| 154 | +>**Note:** The response object shown here might be shortened for readability. |
| 155 | +<!-- { |
| 156 | + "blockType": "response", |
| 157 | + "truncated": true, |
| 158 | + "@odata.type": "Collection(microsoft.graph.delegationSettings)" |
| 159 | +} |
| 160 | +--> |
| 161 | +``` http |
| 162 | +HTTP/1.1 200 OK |
| 163 | +Content-Type: application/json |
| 164 | +
|
| 165 | +{ |
| 166 | + "value": [ |
| 167 | + { |
| 168 | + "@odata.type": "#microsoft.graph.delegationSettings", |
| 169 | + "id": "62de48e1-a72c-40db-9193-a3bd8cf167c9", |
| 170 | + "createdDateTime": "2025-01-01T00:00:00Z", |
| 171 | + "isActive": true, |
| 172 | + "allowedActions": { |
| 173 | + "@odata.type": "microsoft.graph.delegateAllowedActions", |
| 174 | + "makeCalls": true, |
| 175 | + "receiveCalls": true, |
| 176 | + "manageCallAndDelegateSettings": true, |
| 177 | + "pickUpHeldCalls": true, |
| 178 | + "joinActiveCalls": false |
| 179 | + } |
| 180 | + } |
| 181 | + ] |
| 182 | +} |
| 183 | +``` |
0 commit comments