Get appCredentialSignInActivity
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.
Get an appCredentialSignInActivity object that contains recent activity of an application credential.
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) | AuditLog.Read.All | Directory.Read.All |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | AuditLog.Read.All | Directory.Read.All |
Important
In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following least privileged roles are supported for this operation:
- Reports Reader
- Security Reader
- Security Administrator
HTTP request
GET /reports/appCredentialSignInActivities/{appCredentialSignInActivityId}
Optional query parameters
This method does not support OData query parameters to help customize the response. 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 an appCredentialSignInActivity object in the response body.
Examples
Request
The following example shows a request that gets an appCredentialSignInActivity object based on its ID.
GET https://graph.microsoft.com/beta/reports/appCredentialSignInActivities/ODNmNDUyOTYtZmI4Zi00YWFhLWEzOTktYWM1MTA4NGUwMmI3fGFwcGxpY2F0aW9u
Response
The following example shows the response.
HTTP/1.1 200 OK
Content-type: application/json
Content-length: 211
{
"@odata.type": "#microsoft.graph.appCredentialSignInActivity",
"appId": "f4d9654f-0305-4072-878c-8bf266dfe146",
"appObjectId": "6920caa5-1cae-4bc8-bf59-9c0b8495d240",
"credentialOrigin": "application",
"expirationDate": "2021-04-01T21:36:48-8:00",
"id": "ODNmNDUyOTYtZmI4Zi00YWFhLWEzOTktYWM1MTA4NGUwMmI3fGFwcGxpY2F0aW9u",
"keyId": "83f45296-fb8f-4aaa-a399-ac51084e02b7",
"keyType":"certificate",
"keyUsage": "sign",
"resourceId": "a89dc091-a671-4da4-9fcf-3ef06bdf3ac3",
"servicePrincipalObjectId": "cf533854-9fb7-4c01-9c0e-f68922ada8b6",
"signInActivity": {
"lastSignInDateTime": "2021-04-01T00:00:00-8:00",
"lastSignInRequestId": "b0a282a3-68ec-4ec8-aef0-290ed4350271"
}
}