|
| 1 | +--- |
| 2 | +title: "accessPackageSuggestions: filterByCurrentUser" |
| 3 | +description: "Retrieve suggested access packages for the current end user based on various criteria including related people insights." |
| 4 | +ms.localizationpriority: medium |
| 5 | +author: "myra-ramdenbourg" |
| 6 | +ms.subservice: "entra-id-governance" |
| 7 | +doc_type: "apiPageType" |
| 8 | +ms.date: 09/18/2025 |
| 9 | +--- |
| 10 | + |
| 11 | +# accessPackageSuggestions: filterByCurrentUser |
| 12 | + |
| 13 | +Namespace: microsoft.graph |
| 14 | + |
| 15 | +[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)] |
| 16 | + |
| 17 | +Retrieve suggested [accessPackageSuggestion](../resources/accesspackagesuggestion.md) objects for the current end user. This operation returns access packages that are suggested based on various criteria such as related people insights and the user's assignment history. |
| 18 | + |
| 19 | +The suggestions help end users discover relevant access packages they may need for their role or work context. |
| 20 | + |
| 21 | +## Permissions |
| 22 | + |
| 23 | +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). |
| 24 | + |
| 25 | +<!-- { "blockType": "permissions", "name": "accesspackagesuggestions_filterbycurrentuser" } --> |
| 26 | +[!INCLUDE [permissions-table](../includes/permissions/accesspackagesuggestions-filterbycurrentuser-permissions.md)] |
| 27 | + |
| 28 | +## HTTP request |
| 29 | + |
| 30 | +<!-- { "blockType": "ignored" } --> |
| 31 | + |
| 32 | +```http |
| 33 | +GET /identityGovernance/entitlementManagement/accessPackageSuggestions/filterByCurrentUser(on={on}) |
| 34 | +``` |
| 35 | + |
| 36 | +## Function parameters |
| 37 | + |
| 38 | +In the request URL, provide the following query parameters with values. |
| 39 | + |
| 40 | +| Parameter | Type |Description| |
| 41 | +|:-------------|:-------|:----------| |
| 42 | +|on|accessPackageSuggestionFilterByCurrentUserOptions|Filter to determine which suggestions to return. The possible values are: `all`, `assignmentHistory`, `relatedPeopleAssignments`, `unknownFutureValue`.| |
| 43 | + |
| 44 | +## Request headers |
| 45 | + |
| 46 | +| Name |Description| |
| 47 | +|:----------|:----------| |
| 48 | +|Authorization|Bearer {token}. Required. Learn more about [authentication and authorization](/graph/auth/auth-concepts).| |
| 49 | + |
| 50 | +## Request body |
| 51 | + |
| 52 | +Don't supply a request body for this method. |
| 53 | + |
| 54 | +## Response |
| 55 | + |
| 56 | +If successful, this method returns a `200 OK` response code and a collection of [accessPackageSuggestion](../resources/accesspackagesuggestion.md) objects in the response body. |
| 57 | + |
| 58 | +## Examples |
| 59 | + |
| 60 | +### Example 1: Get all access package suggestions with default insight types |
| 61 | + |
| 62 | +#### Request |
| 63 | + |
| 64 | +The following example shows a request. |
| 65 | + |
| 66 | +<!-- { |
| 67 | + "blockType": "request", |
| 68 | + "name": "accesspackagesuggestions_filterbycurrentuser_all" |
| 69 | +}--> |
| 70 | + |
| 71 | +```msgraph-interactive |
| 72 | +GET https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageSuggestions/filterByCurrentUser(on='all')?$expand=availableAccessPackage |
| 73 | +``` |
| 74 | + |
| 75 | + |
| 76 | +#### Response |
| 77 | + |
| 78 | +The following example shows the response. |
| 79 | + |
| 80 | +> **Note:** The response object shown here might be shortened for readability. |
| 81 | +
|
| 82 | +<!-- { |
| 83 | + "blockType": "response", |
| 84 | + "truncated": true, |
| 85 | + "@odata.type": "Collection(microsoft.graph.accessPackageSuggestion)" |
| 86 | +} --> |
| 87 | + |
| 88 | +```http |
| 89 | +HTTP/1.1 200 OK |
| 90 | +Content-type: application/json |
| 91 | +
|
| 92 | +{ |
| 93 | + "@odata.context": "https://graph.microsoft.com/beta/$metadata#identityGovernance/entitlementManagement/accessPackageSuggestions/filterByCurrentUser(on='all')", |
| 94 | + "value": [ |
| 95 | + { |
| 96 | + "id": "51b4bd29-cb2d-ef11-8b5f-20c19bd3bce6", |
| 97 | + "reasons": [ |
| 98 | + { |
| 99 | + "@odata.type": "#microsoft.graph.accessPackageSuggestionRelatedPeopleBased", |
| 100 | + "relatedPeopleAssignmentCount": 2 |
| 101 | + }, |
| 102 | + { |
| 103 | + "@odata.type": "#microsoft.graph.accessPackageSuggestionSelfAssignmentHistoryBased", |
| 104 | + "pastAssignmentCount": 2, |
| 105 | + "lastAssignmentDateTime": "2024-08-08T19:13:50.023-07:00" |
| 106 | + } |
| 107 | + ], |
| 108 | + "accessPackage": { |
| 109 | + "id": "51b4bd29-cb2d-ef11-8b5f-20c19bd3bce6", |
| 110 | + "displayName": "ap_discoverable", |
| 111 | + "description": "Discoverable package" |
| 112 | + } |
| 113 | + }, |
| 114 | + { |
| 115 | + "id": "fa6338d0-d12d-ef11-8b5f-20c19bd3bce6", |
| 116 | + "reasons": [ |
| 117 | + { |
| 118 | + "@odata.type": "#microsoft.graph.accessPackageSuggestionRelatedPeopleBased", |
| 119 | + "relatedPeopleAssignmentCount": 3 |
| 120 | + } |
| 121 | + ], |
| 122 | + "accessPackage": { |
| 123 | + "id": "fa6338d0-d12d-ef11-8b5f-20c19bd3bce6", |
| 124 | + "displayName": "ap_allMembers", |
| 125 | + "description": "package with all members" |
| 126 | + } |
| 127 | + } |
| 128 | + ] |
| 129 | +} |
| 130 | +``` |
| 131 | + |
| 132 | +### Example 2: Get access package suggestions based on assignment history |
| 133 | + |
| 134 | +#### Request |
| 135 | + |
| 136 | +The following example shows a request. |
| 137 | + |
| 138 | +<!-- { |
| 139 | + "blockType": "request", |
| 140 | + "name": "accesspackagesuggestions_filterbycurrentuser_history" |
| 141 | +}--> |
| 142 | + |
| 143 | +```msgraph-interactive |
| 144 | +GET https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageSuggestions/filterByCurrentUser(on='assignmentHistory')?$expand=availableAccessPackage |
| 145 | +``` |
| 146 | + |
| 147 | + |
| 148 | +#### Response |
| 149 | + |
| 150 | +The following example shows the response. |
| 151 | + |
| 152 | +> **Note:** The response object shown here might be shortened for readability. |
| 153 | +
|
| 154 | +<!-- { |
| 155 | + "blockType": "response", |
| 156 | + "truncated": true, |
| 157 | + "@odata.type": "Collection(microsoft.graph.accessPackageSuggestion)" |
| 158 | +} --> |
| 159 | + |
| 160 | +```http |
| 161 | +HTTP/1.1 200 OK |
| 162 | +Content-type: application/json |
| 163 | +
|
| 164 | +{ |
| 165 | + "@odata.context": "https://graph.microsoft.com/beta/$metadata#identityGovernance/entitlementManagement/accessPackageSuggestions/filterByCurrentUser(on='assignmentHistory')", |
| 166 | + "value": [ |
| 167 | + { |
| 168 | + "id": "97ce41d0-fc5c-4e10-a979-1ad18e8242d7", |
| 169 | + "reasons": [ |
| 170 | + { |
| 171 | + "@odata.type": "#microsoft.graph.accessPackageSuggestionSelfAssignmentHistoryBased", |
| 172 | + "pastAssignmentCount": 3, |
| 173 | + "lastAssignmentDateTime": "2024-11-28T01:28:15.313Z" |
| 174 | + } |
| 175 | + ], |
| 176 | + "accessPackage": { |
| 177 | + "id": "97ce41d0-fc5c-4e10-a979-1ad18e8242d7", |
| 178 | + "displayName": "ap_allDirectoryUsers", |
| 179 | + "description": "All directory users" |
| 180 | + } |
| 181 | + }, |
| 182 | + { |
| 183 | + "id": "8a14d3a6-32d0-4681-bbcc-a307d247ed3c", |
| 184 | + "reasons": [ |
| 185 | + { |
| 186 | + "@odata.type": "#microsoft.graph.accessPackageSuggestionSelfAssignmentHistoryBased", |
| 187 | + "pastAssignmentCount": 2, |
| 188 | + "lastAssignmentDateTime": "2024-11-28T01:08:51.667Z" |
| 189 | + } |
| 190 | + ], |
| 191 | + "accessPackage": { |
| 192 | + "id": "8a14d3a6-32d0-4681-bbcc-a307d247ed3c", |
| 193 | + "displayName": "8/1 first", |
| 194 | + "description": "desc" |
| 195 | + } |
| 196 | + } |
| 197 | + ] |
| 198 | +} |
| 199 | +``` |
0 commit comments