List signIns

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.

Get a list of signIn objects. The list contains the user sign-ins for your Azure Active Directory tenant. Sign-ins where a username and password are passed as part of authorization token, and successful federated sign-ins are currently included in the sign-in logs. The most recent sign-ins are returned first.

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) AuditLog.Read.All, Directory.Read.All
Delegated (personal Microsoft account) Not supported
Application AuditLog.Read.All, Directory.Read.All

In addition, apps must be properly registered to Azure Active Directory.

HTTP request

GET auditLogs/signIns

Optional query parameters

This method supports the following OData Query Parameters to help customize the response. For details about how to use these parameters, see OData query parameters.

Name Description Example
$filter Filters results (rows). /auditLogs/signIns?&$filter=createdDateTime le 2018-01-24
$top Sets the page size of results. /auditLogs/signIns?$top=1
$skiptoken Retrieves the next page of results from result sets that span multiple pages. /auditLogs/signIns?$skiptoken=01fa0e77c60c2d3d63226c8e3294c860__1

Attributes supported by $filter parameter

Attribute Name Supported operators
id eq
userId eq
appId eq
createdDateTime eq, le, ge
userDisplayName eq, startswith
userPrincipalName eq, startswith
appDisplayName eq, startswith
authenticationRequirement eq, startswith
ipAddress eq, startswith
location/city eq, startswith
location/state eq, startswith
location/countryOrRegion eq, startswith
status/errorCode eq
initiatedBy/user/id eq
initiatedBy/user/displayName eq
initiatedBy/user/userPrincipalName eq, startswith
clientAppUsed eq
conditionalAccessStatus eq
deviceDetail/browser eq, startswith
deviceDetail/operatingSystem eq, startswith
correlationId eq
riskDetail eq
riskLevelAggregated eq
riskLevelDuringSignIn eq
riskEventTypes eq
riskEventTypes_v2 eq, startswith
riskState eq
originalRequestId eq
tokenIssuerName eq
tokenIssuerType eq
resourceDisplayName eq
resourceId eq
servicePrincipalId eq, startswith
servicePrincipalName eq, startswith
userAgent eq, startswith
alternateSignInName eq, startswith

Request headers

Name Description
Authorization Bearer {token}

Request body

Do not supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and collection of signIn objects in the response body.

Examples

Example 1: User signs in using MFA, which is triggered by a conditional access policy. Primary authentication is through FIDO.

Request

The following is an example of the request.

GET https://graph.microsoft.com/beta/auditLogs/signIns

Response

The following is an example of the response.

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 211

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#auditLogs/signIns",
    "value": [
        {
            "id": "66ea54eb-blah-4ee5-be62-ff5a759b0100",
            "createdDateTime": "2020-03-13T19:15:41.6195833Z",
            "userDisplayName": "Test contoso",
            "userPrincipalName": "testaccount1@contoso.com",
            "userId": "26be570a-1111-5555-b4e2-a37c6808512d",
            "appId": "de8bc8b5-5555-6666-a8ad-b748da725064",
            "appDisplayName": "Graph explorer",
            "authenticationRequirement": "multiFactorAuthentication",
            "ipAddress": "131.107.159.37",
            "clientAppUsed": "Browser",
            "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36 Edg/80.0.361.66",
            "correlationId": "d79f5bee-blah-4832-928f-3133e22ae912",
            "conditionalAccessStatus": "notApplied",
            "originalRequestId": "66ea54eb-blah-4ee5-be62-ff5a759b0100",
            "isInteractive": true,
            "tokenIssuerName": "",
            "tokenIssuerType": "AzureAD",
            "processingTimeInMilliseconds": 541,
            "riskDetail": "none",
            "riskLevelAggregated": "none",
            "riskLevelDuringSignIn": "none",
            "riskState": "none",
            "riskEventTypes": [],
            "riskEventTypes_v2": [],
            "resourceDisplayName": "Microsoft Graph",
            "resourceId": "00000003-0000-0000-c000-000000000000",
            "authenticationMethodsUsed": [],
            "alternateSignInName": "testaccount2.contoso.com",
            "servicePrincipalName": null,
            "servicePrincipalId": "",
            "mfaDetail": null,
            "status": {
                "errorCode": 0,
                "failureReason": null,
                "additionalDetails": null
            },
            "deviceDetail": {
                "deviceId": "",
                "displayName": null,
                "operatingSystem": "Windows 10",
                "browser": "Edge 80.0.361",
                "isCompliant": null,
                "isManaged": null,
                "trustType": null
            },
            "location": {
                "city": "Redmond",
                "state": "Washington",
                "countryOrRegion": "US",
                "geoCoordinates": {
                    "altitude": null,
                    "latitude": 47.68050003051758,
                    "longitude": -122.12094116210938
                }
            },
            "appliedConditionalAccessPolicies": [
                {
                    "id": "de7e60eb-ed89-4d73-8205-2227def6b7c9",
                    "displayName": "SharePoint limited access for guest workers",
                    "enforcedGrantControls": [],
                    "enforcedSessionControls": [],
                    "result": "notEnabled",
                    "conditionsSatisfied": "none",
                    "conditionsNotSatisfied": "none"
                },
                {
                    "id": "6701123a-b4c6-48af-8565-565c8bf7cabc",
                    "displayName": "Medium signin risk block",
                    "enforcedGrantControls": [],
                    "enforcedSessionControls": [],
                    "result": "notEnabled",
                    "conditionsSatisfied": "none",
                    "conditionsNotSatisfied": "none"
                },
               
            ],
            "authenticationProcessingDetails": [],
            "networkLocationDetails": [],
            "authenticationDetails": [
                    {
			  "authenticationStepDateTime":"2018-11-06T18:48:03.8313489Z",
			  "authenticationMethod":"FIDO2",
			  "authenticationMethodDetail":"1G54395783",
			  "succeeded":true,
			  "authenticationStepResultDetail":"methodSucceeded",
			  "authenticationStepRequirement":"Primary authentication"
			},
			{
			  "authenticationStepDateTime":"2018-11-06T18:48:12.94725647Z",
			  "authenticationMethod":"Claim in access token",
			  "authenticationMethodDetail":null,
			  "succeeded":true,
			  "authenticationStepResultDetail":"methodSucceeded",
			  "authenticationStepRequirement":"MFA"
			}
            ],
            "authenticationRequirementPolicies": []
        }
    ]
}

Example 2: User signs in with only primary authentication. Primary authentication is through cloud password.

Request

The following is an example of the request.

GET https://graph.microsoft.com/beta/auditLogs/signIns

Response

The following is an example of the response.

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 211

{
  "@odata.context": "https://graph.microsoft.com/beta/$metadata#auditLogs/signIns",
  "value": [
    {
      "id":"b01b1726-0147-425e-a7f7-21f252050400",
      "createdDateTime":"2018-11-06T18:48:33.8527147Z",
      "userDisplayName":"Jon Doe",
      "userPrincipalName":"jdoe@contoso.com",
      "userId":"d7cc485d-2c1b-422c-98fd-5ce52859a4a3",
      "appId":"c44b4083-3bb0-49c1-b47d-974e53cbdf3c",
      "appDisplayName":"Azure Portal",
       "authenticationRequirement": "singleFactorAuthentication",
      "ipAddress":"207.254.19.10",
      "clientAppUsed":"Browser",
      "authenticationDetails": [ 
        {
          "authenticationStepDateTime":"2018-11-06T18:48:03.8313489Z",
          "authenticationMethod":"Password",
          "authenticationMethodDetail":"Cloud password",
          "succeeded":true,
          "authenticationStepResultDetail":"methodSucceeded",
          "authenticationStepRequirement":"Primary authentication"
        }
      ],
      "correlationId":"65dd87ce-2183-419e-81a9-d6e20379bcc2",
      "conditionalAccessStatus":"applied",
      "isInteractive":true,
      "tokenIssuerName":null,
      "tokenIssuerType":"AzureAD",
      "processingTimeInMilliseconds":100,
      "riskDetail":"none",
      "riskLevelAggregated":"none",
      "riskLevelDuringsignIn":"none",
      "riskState":"none",
      "riskEventTypes":[],
      "resourceDisplayName":"windows azure service management api",
      "resourceId":"797f4846-ba00-4fd7-ba43-dac1f8f63013",
      "status":{},
      "deviceDetail": {
        "deviceId":null,
        "displayName":null,
        "operatingSystem":"Windows 7",
        "browser":"Chrome 63.0.3239",
        "isCompliant":null,
        "isManaged":null,
        "trustType":null
      },
      "location": {
        "city":"Lithia Springs",
        "state":"Georgia",
        "countryOrRegion":"US",
        "geoCoordinates": {
          "altitude":null,
          "latitude":33.7930908203125,
          "longitude":-84.445358276367188
        }
      },
      "appliedConditionalAccessPolicies": [
        {
          "id":"6551c58c-e5da-4036-a6ea-c2c3fad264f1",
          "displayName":"MFA policy",
          "enforcedGrantControls": [
            "Mfa",
            "RequireCompliantDevice"
          ],
          "enforcedSessionControls":[],
          "result":"notApplied"
        },
        {
          "id":"b645a140-20fe-4ce0-a724-18ab201e9026",
          "displayName":"PipelineTest4",
          "enforcedGrantControls":[],
          "enforcedSessionControls":[],
          "result":"notEnabled"
        }
      ],
      "authenticationProcessingDetails":[],
      "networkLocationDetails":[]
    }
  ]
}