SOLVED

Filter Azure AD Signin Logs using Graph API

%3CLINGO-SUB%20id%3D%22lingo-sub-3073955%22%20slang%3D%22en-US%22%3EFilter%20Azure%20AD%20Signin%20Logs%20using%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3073955%22%20slang%3D%22en-US%22%3E%3CP%3EHello!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20exploring%20how%20to%20filter%20the%20signin%20logs%20using%20REST%20calls.%20I'll%20be%20honest%2C%20for%20me%2C%20the%20syntax%20for%20this%20is%20a%20little%20confusing.%20Any%20help%20would%20be%20great.%20I%20am%20interested%20in%20filtering%20for%20signin%20status%20where%20the%20errorcode%20has%20a%20value%20of%20zero%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20far%2C%20and%20woefully%20wrong!%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%26nbsp%3B%3CDIV%3E%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FauditLogs%2Fsignins%3F%24filter%3DuserDisplayName%2Fany(s%3As%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FauditLogs%2Fsignins%3F%24filter%3Dstatus%2Fany(s%3As%2Ferrorcode%20eq%20'0')%3C%2FA%3E%3CDIV%3E%26nbsp%3B%3CDIV%3EWhere%20am%20I%20going%20wrong%3F%3CDIV%3E%26nbsp%3B%3CDIV%3EThanks%3CDIV%3E%26nbsp%3B%3CDIV%3E%2FA%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3073955%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Active%20Directory%20(AAD)%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3074222%22%20slang%3D%22en-US%22%3ERe%3A%20Filter%20Azure%20AD%20Signin%20Logs%20using%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3074222%22%20slang%3D%22en-US%22%3EI'll%20be%20the%20first%20to%20agree%20that%20filtering%20in%20Graph%20is%20crap%20%3AD%3C%2Fimg%3E%20Try%20this%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FauditLogs%2Fsignins%3F%24filter%3Dstatus%2Ferrorcode%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FauditLogs%2Fsignins%3F%24filter%3Dstatus%2Ferrorcode%3C%2FA%3E%20eq%200%26amp%3B%24top%3D1%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3074874%22%20slang%3D%22en-US%22%3ERe%3A%20Filter%20Azure%20AD%20Signin%20Logs%20using%20Graph%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3074874%22%20slang%3D%22en-US%22%3EVasil%20you%20genius!%20You%20did%20it%20again%20mate!%3CBR%20%2F%3E%2FA%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello!

 

I am exploring how to filter the signin logs using REST calls. I'll be honest, for me, the syntax for this is a little confusing. Any help would be great. I am interested in filtering for signin status where the errorcode has a value of zero

 

So far, and woefully wrong! :

 

2 Replies
best response confirmed by Compulinx (Occasional Contributor)
Solution
I'll be the first to agree that filtering in Graph is crap :D Try this:

https://graph.microsoft.com/beta/auditLogs/signins?$filter=status/errorcode eq 0&$top=1
Vasil you genius! You did it again mate!
/A