Get appConsentRequest
Article
03/02/2023
2 minutes to read
4 contributors
Feedback
In this article
Namespace: microsoft.graph
Read the properties and relationships of an appConsentRequest object.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions .
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
ConsentRequest.Read.All, ConsentRequest.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Application
ConsentRequest.Read.All, ConsentRequest.ReadWrite.All
HTTP request
GET /identityGovernance/appConsent/appConsentRequests/{id}
Optional query parameters
This method supports the $select
OData query parameter to help customize the response. For general information, see OData query parameters .
Name
Description
Authorization
Bearer {token}. Required.
Request body
Do not supply a request body for this method.
Response
If successful, this method returns a 200 OK
response code and an appConsentRequest object in the response body.
Examples
Request
GET https://graph.microsoft.com/v1.0/identityGovernance/appConsent/appConsentRequests/7322e5f3-0f15-4eb8-9e82-2029e8622f5d
var graphClient = new GraphServiceClient(requestAdapter);
var result = await graphClient.IdentityGovernance.AppConsent.AppConsentRequests["{appConsentRequest-id}"].GetAsync();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
const options = {
authProvider,
};
const client = Client.init(options);
let appConsentRequest = await client.api('/identityGovernance/appConsent/appConsentRequests/7322e5f3-0f15-4eb8-9e82-2029e8622f5d')
.get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
AppConsentRequest appConsentRequest = graphClient.identityGovernance().appConsent().appConsentRequests("7322e5f3-0f15-4eb8-9e82-2029e8622f5d")
.buildRequest()
.get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
result, err := graphClient.IdentityGovernance().AppConsent().AppConsentRequestsById("appConsentRequest-id").Get(context.Background(), nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Import-Module Microsoft.Graph.Identity.Governance
Get-MgIdentityGovernanceAppConsentRequest -AppConsentRequestId $appConsentRequestId
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestResult = $graphServiceClient->identityGovernance()->appConsent()->appConsentRequestsById('appConsentRequest-id')->get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
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#identityGovernance/appConsent/appConsentRequests/$entity",
"id": "7322e5f3-0f15-4eb8-9e82-2029e8622f5d",
"appId": "de8bc8b5-d9f9-48b1-a8ad-b748da725064",
"appDisplayName": "Graph Explorer",
"consentType": "Dynamic",
"pendingScopes": [],
"userConsentRequests@odata.context": "https://graph.microsoft.com/v1.0/$metadata#identityGovernance/appConsent/appConsentRequests('7322e5f3-0f15-4eb8-9e82-2029e8622f5d')/userConsentRequests",
"userConsentRequests": []
}