如何在Azure AD登录REST API请求中指定时间 [英] How to specify time in Azure AD Sign In REST API request

查看:54
本文介绍了如何在Azure AD登录REST API请求中指定时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在特定时间段后检索数据,以避免重复.我可以根据日期进行过滤.根据今天的日期进行过滤时,签入数据中重复了后续请求的日期

I need to retrieve the data after a specific period of time in order to avoid duplication. I can filter out based on the date. On filtering based on today's date, there is repetition in signIn data for the date for consequent requests

我已经尝试了以下API的过滤条件引用链接:https://docs.microsoft.com/zh-cn/graph/api/signin-list?view=graph-rest-1.0&stabs=http

I have tried the filtering criteria for the following API Ref link: https://docs.microsoft.com/en-us/graph/api/signin-list?view=graph-rest-1.0&tabs=http

我尝试过的示例请求: https://graph.microsoft.com/beta/auditLogs/signIns?&$filter=createdDateTime gt 2020-09-29

Sample Request I have tried : https://graph.microsoft.com/beta/auditLogs/signIns?&$filter=createdDateTime gt 2020-09-29

我需要在此请求中指定时间...任何想法..?

I need to specify the time in this request...Any ideas ..?

预先感谢

推荐答案

您在正确的轨道上!您使用的过滤器也会接受时间.

You're on the right track! The filter you're using also accepts a time.

如果您选中

If you check the List sign-in response you'll see the format Microsoft uses to specify the date and the time in out field.

尝试使用此URI(适用于2020-09-29 19:00:00之后的所有项目(如 z 末尾所述的UTC):

Try this URI (for all items after 2020-09-29 19:00:00 (UTC as noted by the z at the end)):

https://graph.microsoft.com/beta/auditLogs/signIns?&$filter=createdDateTime gt 2020-09-29T19:00:00z

这篇关于如何在Azure AD登录REST API请求中指定时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆