-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SignIns value is not a collection #351
Comments
Hi @L4r1k |
Absolutely! I provided the code snippet here where the code is identical except the imports are replaced with |
Hi, has there been any movement on this? It's a big blocker for my application 😢 |
Thanks for your patience with this. Can you update graph core and see if you're still facing the issue? |
Updating did not fix the issue. For reference I'm using |
yes, those are the correct versions/packages. are you able to provide a stacktrace for the issue? |
Have you reviewed the code snippet I provided? The error occurs upon making the initial request prior to any pagination loops. It appears this go package does not consider the content returned by the beta signins API to be a valid collection. I can try to provide a stack trace if you tell me exactly what information you need, what more do you need to know?
|
I'm suspecting the error is returned by one of those two locations: This is most likely caused by a metadata and service behaviour misalignment. |
I agree, my hunch is that's is a metadata misalignment as well. Here's a truncated (single value) return value from the beta signins endpoint: {
"@odata.context": "https://graph.microsoft.com/beta/$metadata#auditLogs/signIns",
"@odata.nextLink": "https://graph.microsoft.com/beta/auditLogs/signIns?$skiptoken=adsfweaeawfc447dd1ca4bd00f45fcbf9ae9asdaaewwadxd1231235e5adea3a4f9d9dc",
"@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET auditLogs/signIns?$select=appDisplayName,appId",
"value": [
{
"id": "<uuid>",
"createdDateTime": "2023-12-05T16:33:31Z",
"userDisplayName": "Jack H",
"userPrincipalName": "[email protected]",
"userId": "<uuid>",
"appId": "<uuid>",
"appDisplayName": "Azure Portal",
"ipAddress": "<ipv4>",
"ipAddressFromResourceProvider": null,
"clientAppUsed": "Browser",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
"correlationId": "<uuid>",
"conditionalAccessStatus": "success",
"originalRequestId": "",
"isInteractive": true,
"tokenIssuerName": "",
"tokenIssuerType": "AzureAD",
"clientCredentialType": "none",
"processingTimeInMilliseconds": 85,
"riskDetail": "none",
"riskLevelAggregated": "none",
"riskLevelDuringSignIn": "none",
"riskState": "none",
"riskEventTypes_v2": [],
"resourceDisplayName": "Windows Azure Service Management API",
"resourceId": "<uuid>",
"resourceTenantId": "<uuid>",
"homeTenantId": "<uuid>",
"homeTenantName": "",
"authenticationMethodsUsed": [],
"authenticationRequirement": "multiFactorAuthentication",
"signInIdentifier": "",
"signInIdentifierType": null,
"servicePrincipalName": null,
"signInEventTypes": [
"interactiveUser"
],
"servicePrincipalId": "",
"federatedCredentialId": null,
"userType": "member",
"flaggedForReview": false,
"isTenantRestricted": false,
"autonomousSystemNumber": "<5digitint>",
"crossTenantAccessType": "none",
"servicePrincipalCredentialKeyId": null,
"servicePrincipalCredentialThumbprint": "",
"uniqueTokenIdentifier": "<string>",
"incomingTokenType": "primaryRefreshToken",
"authenticationProtocol": "none",
"resourceServicePrincipalId": "<uuid>",
"signInTokenProtectionStatus": "unbound",
"originalTransferMethod": "none",
"authenticationAppDeviceDetails": null,
"status": {
"errorCode": 0,
"failureReason": "Other.",
"additionalDetails": "MFA requirement satisfied by claim in the token"
},
"deviceDetail": {
"deviceId": "",
"displayName": "",
"operatingSystem": "MacOs",
"browser": "Chrome 119.0.0",
"isCompliant": false,
"isManaged": false,
"trustType": ""
},
"location": {
"city": "Westminster",
"state": "Greater London",
"countryOrRegion": "GB",
"geoCoordinates": {
"altitude": null,
"latitude": "<lat>",
"longitude": "<lon>"
}
},
"mfaDetail": {
"authMethod": null,
"authDetail": null
},
"appliedConditionalAccessPolicies": [],
"authenticationContextClassReferences": [],
"authenticationProcessingDetails": [
{
"key": "Root Key Type",
"value": "Unknown"
},
{
"key": "Oauth Scope Info",
"value": "[\"user_impersonation\"]"
}
],
"networkLocationDetails": [],
"authenticationDetails": [
{
"authenticationStepDateTime": "2023-12-05T16:33:31Z",
"authenticationMethod": "Previously satisfied",
"authenticationMethodDetail": null,
"succeeded": true,
"authenticationStepResultDetail": "MFA requirement satisfied by claim in the token",
"authenticationStepRequirement": ""
}
],
"authenticationRequirementPolicies": [
{
"requirementProvider": "multiConditionalAccess",
"detail": "Conditional Access"
}
],
"sessionLifetimePolicies": [],
"privateLinkDetails": {
"policyId": "",
"policyName": "",
"resourceId": "",
"policyTenantId": ""
},
"appliedEventListeners": [],
"authenticationAppPolicyEvaluationDetails": [],
"managedServiceIdentity": {
"msiType": "none",
"associatedResourceId": null,
"federatedTokenId": null,
"federatedTokenIssuer": null
}
}
]
} |
Thanks for the additional information. And see on which field exactly it fails. |
Thanks for the guidance. My findings after a little debugging are that the MS Graph request to signins goes through OK and does return initial data. I set breakpoints on the lines you suggested and they didn't fire, but I realized there's a third line in which Tracking this a bit further back up the callstack it appears this data occurs in the I wonder if there is infact a metadata misalignment, related to conditional access similar to this issue but I'm not sure how to verify that. |
Thanks for digging into this, this seems like a metadata drift as well. |
Created the ICM: https://portal.microsofticm.com/imp/v3/incidents/incident/448554894/summary |
Update from the ICM: here is the full story. The service originally documented a single value, but returned a collection. We implemented a postfix when this was reported by customers and advised the service. Where we thought they'd change the metadata to a collection in the source, they in facts changed the service behavior to return a single value without notifying us. |
Update: the outdated post fix was removed, we should see the next generation (Tuesday) address this issue. Thanks for your patience. |
Hitting the SignIns list MS Graph API endpoint results in the error
value is not a collection
. I think this may be related to the SignIn metadata differing from the model go expects.I have tried dropping back to the v1 SDK to retrieve SignIns and came across a different issue that also blocked SignIn retrieval: microsoftgraph/msgraph-sdk-go#617 so I'm left at the moment not being able to retrieve SignIns from
msgraph-sdk-go
ormsgraph-beta-sdk-go
.The text was updated successfully, but these errors were encountered: