List appConsentRequests
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.
Retrieve appConsentRequest objects and their properties.
This API is available in the following national cloud deployments.
Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
---|---|---|---|
✅ | ✅ | ✅ | ❌ |
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) | ConsentRequest.Read.All | ConsentRequest.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | ConsentRequest.Read.All | ConsentRequest.ReadWrite.All |
HTTP request
GET /identityGovernance/appConsent/appConsentRequests
Optional query parameters
This method supports the $select
, $skip
, $top
, $filter
(eq
), and $orderby
OData query parameters to help customize the response. You can also apply $filter
(eq
) on the collection of objects in theuserConsentRequests relationship. For general information, see OData query parameters.
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 collection of appConsentRequest objects in the response body.
Examples
Example 1: List all appConsentRequests
Request
GET https://graph.microsoft.com/beta/identityGovernance/appConsent/appConsentRequests
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/beta/$metadata#identityGovernance/appConsent/appConsentRequests",
"@odata.count": 1,
"value": [
{
"id": "7322e5f3-0f15-4eb8-9e82-2029e8622f5d",
"appId": "de8bc8b5-d9f9-48b1-a8ad-b748da725064",
"appDisplayName": "Graph Explorer",
"consentType": "Dynamic",
"pendingScopes": [
{
"displayName": "AccessReview.Read.All"
},
{
"displayName": "openid"
},
{
"displayName": "profile"
},
{
"displayName": "offline_access"
}
],
"userConsentRequests@odata.context": "https://graph.microsoft.com/beta/$metadata#identityGovernance/appConsent/appConsentRequests('7322e5f3-0f15-4eb8-9e82-2029e8622f5d')/userConsentRequests",
"userConsentRequests": []
}
]
}
Example 2: List all appConsentRequests with at least one userConsentRequest whose status is InProgress
Request
GET https://graph.microsoft.com/beta/identityGovernance/appConsent/appConsentRequests?$filter=userConsentRequests/any (u:u/status eq 'InProgress')
Response
The following example shows the response. The response object includes all appConsentRequest objects that have at least one userConsentRequest that's InProgress
, but doesn't expand the related userConsentRequests relationship.
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/beta/$metadata#identityGovernance/appConsent/appConsentRequests",
"@odata.count": 1,
"value": [
{
"id": "7322e5f3-0f15-4eb8-9e82-2029e8622f5d",
"appId": "de8bc8b5-d9f9-48b1-a8ad-b748da725064",
"appDisplayName": "Graph Explorer",
"consentType": "Dynamic",
"pendingScopes": [
{
"displayName": "AccessReview.Read.All"
},
{
"displayName": "openid"
},
{
"displayName": "profile"
},
{
"displayName": "offline_access"
}
],
"userConsentRequests@odata.context": "https://graph.microsoft.com/beta/$metadata#identityGovernance/appConsent/appConsentRequests('7322e5f3-0f15-4eb8-9e82-2029e8622f5d')/userConsentRequests",
"userConsentRequests": []
}
]
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for