Graph API未正确返回报告的userPrincipalName [英] Graph API not returning userPrincipalName correctly for reports

查看:43
本文介绍了Graph API未正确返回报告的userPrincipalName的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在使用Graph API开发适用于我们公司的报告的应用程序,但存在报告调用无法正确返回用户主体名称(似乎已加密)的问题,例如,在调用https时: //graph.microsoft.com/beta/reports/getTeamsActivityUserDetail(period='D7')?$ format = application/json

Hi, Im working on a application to build reports for our company using the Graph API but having issues where the reports call does not return the userPrincipalName correctly (appears to be encrypted), eg when calling https://graph.microsoft.com/beta/reports/getTeamsActivityUserDetail(period='D7')?$format=application/json

但在致电时 https://graph .microsoft.com/beta/users    I 获得 userPrincipalName作为用户按预期方式发送的电子邮件.我们的租户已向我的应用程序授予了User.Read.All和Reports.Read.All. 

But when calling https://graph.microsoft.com/beta/users  I get the userPrincipalName as the users email as expected. My application has been granted both User.Read.All and Reports.Read.All for our tenant. 

是否需要将其他权限授予该应用程序才能在报告中查看userPrincipalName?还是可能有安全设置阻止了它?我很感谢对此的指点,谢谢

Is there some other permission that needs to be granted to the app to see the userPrincipalName in reports? Or maybe there is a security setting blocking it? Id appreciate pointers on this, thanks

推荐答案

如果没有给出适当的例子,我们只能猜测.我最好的猜测是,所讨论的租户具有匿名"身份.配置的设置,如下所示: https://support.microsoft.com/zh-CN/help/4090039/reports-show-anonymous-instead-of-actual-user-names-in-office-365
Without giving a proper example, we can only guess. My best guess is that the tenant in question has the "anonymization" setting configured, as detailed here: https://support.microsoft.com/en-us/help/4090039/reports-show-anonymous-instead-of-actual-user-names-in-office-365


这篇关于Graph API未正确返回报告的userPrincipalName的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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