作为 office 365 管理员,我可以订阅其他 365 用户事件的侦听事件吗?
As a office 365 admin, Can I subscribe to listen events of other 365 users events?
作为 Office 365 管理员,我可以在 Microsoft Graph 上订阅其他 365 用户事件的侦听事件吗?
我可以为我获取活动 https://graph.microsoft.com/v1.0/me/events 或
"/v1.0/users/Admin@tenant.onmicrosoft.com/events" -- 工作正常......但是当管理员试图获取其他用户的事件详细信息时。我收到错误
"message": "Access is denied. Check credentials and try again.",
https://graph.microsoft.com/v1.0/users/ABC@tenant.onmicrosoft.com
是否可以获取其他用户的活动详情?如果是,请告诉我管理员端缺少的任何设置。如果不是,那么 api 与“/v1.0/users/”和“/v1.0/me/”之间有什么区别
是的。您可以使用 Client Credential flow 获取应用程序的应用程序令牌。并且请确保您注册的应用程序具有 Calendars.Read 范围以读取所有邮箱中的日历,如下图所示:
详情请参考here。
应用专用令牌的代码请求:
public static async Task<string> GetTokenAsync(string resource, string clientId, string secrect)
{
string authority = "https://login.microsoftonline.com/{yourtenant}";
AuthenticationContext authContext = new AuthenticationContext(authority);
ClientCredential clientCredential = new ClientCredential(clientId, secrect);
AuthenticationResult authResult=await authContext.AcquireTokenAsync(resource, clientCredential);
return authResult.AccessToken;
}
public static void GetAccessTokenByClientCredential()
{
string clientId = "";
string secrect = "";
string resrouce = "https://graph.microsoft.com";
string accessToken= TokenHelper.GetTokenAsync(resrouce, clientId, secrect).Result;
Console.WriteLine($"Access Token: {accessToken}");
}
根据微软人员的说法,要使用 /events 端点查看其他用户的日历,您需要特殊权限(类似于 Calendar.Read.Shared),我们仍在添加该权限,请查看下方 link..
此帖子由 Venkat Ayyadevara - MSFT 于 2016 年 4 月 21 日发布,我想仍在进行中。
作为 Office 365 管理员,我可以在 Microsoft Graph 上订阅其他 365 用户事件的侦听事件吗?
我可以为我获取活动 https://graph.microsoft.com/v1.0/me/events 或
"/v1.0/users/Admin@tenant.onmicrosoft.com/events" -- 工作正常......但是当管理员试图获取其他用户的事件详细信息时。我收到错误
"message": "Access is denied. Check credentials and try again.",
https://graph.microsoft.com/v1.0/users/ABC@tenant.onmicrosoft.com
是否可以获取其他用户的活动详情?如果是,请告诉我管理员端缺少的任何设置。如果不是,那么 api 与“/v1.0/users/”和“/v1.0/me/”之间有什么区别
是的。您可以使用 Client Credential flow 获取应用程序的应用程序令牌。并且请确保您注册的应用程序具有 Calendars.Read 范围以读取所有邮箱中的日历,如下图所示:
详情请参考here。
应用专用令牌的代码请求:
public static async Task<string> GetTokenAsync(string resource, string clientId, string secrect)
{
string authority = "https://login.microsoftonline.com/{yourtenant}";
AuthenticationContext authContext = new AuthenticationContext(authority);
ClientCredential clientCredential = new ClientCredential(clientId, secrect);
AuthenticationResult authResult=await authContext.AcquireTokenAsync(resource, clientCredential);
return authResult.AccessToken;
}
public static void GetAccessTokenByClientCredential()
{
string clientId = "";
string secrect = "";
string resrouce = "https://graph.microsoft.com";
string accessToken= TokenHelper.GetTokenAsync(resrouce, clientId, secrect).Result;
Console.WriteLine($"Access Token: {accessToken}");
}
根据微软人员的说法,要使用 /events 端点查看其他用户的日历,您需要特殊权限(类似于 Calendar.Read.Shared),我们仍在添加该权限,请查看下方 link..
此帖子由 Venkat Ayyadevara - MSFT 于 2016 年 4 月 21 日发布,我想仍在进行中。