asp.net-mvc – 在ASP.NET MVC组织帐户中访问Azure AD Graph API
发布时间:2020-12-16 09:55:28 所属栏目:asp.Net 来源:网络整理
导读:我试图根据登录用户的AD组限制页面访问.我有以下代码的问题. var tenantId = incomingPrincipal.FindFirst(GraphConfiguration.TenantIdClaimType).Value; //create Azure Graph Api client to make api calls var client = Helpers.AzureGraphAPIFunctions.
我试图根据登录用户的AD组限制页面访问.我有以下代码的问题.
var tenantId = incomingPrincipal.FindFirst(GraphConfiguration.TenantIdClaimType).Value; //create Azure Graph Api client to make api calls var client = Helpers.AzureGraphAPIFunctions.GetActiveDirectoryClient(tenantId); IGroup group = client.Groups.Where(x => x.DisplayName == groupName).ExecuteSingleAsync().Result; 这些代码工作正常,并通过groupName获取AD组,但有时会抛出异常
{"odata.error":{"code":"Directory_BindingRedirection","message":{"lang":"en","value":"Tenant information is not available locally. Use the following Urls to get the information."},"values":[ {"item":"Url1","value":"https://directory-s1-ch1.directory.windows.net"},{"item":"Url2","value":"https://directory-s1-sn2.directory.windows.net"},{"item":"Url3","value":"https://directory-s1-co1.directory.windows.net"},{"item":"Url4","value":"https://directory-s1-bl2.directory.windows.net"} ]}} 有任何想法吗? 谢谢 解决方法
伙计们,
我们目前正在调查此问题(您不应该看到此错误).它看起来像一个回归.当我有更多信息时会更新这个帖子. 更新: 为那些受此事件影响的人道歉. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – asp.net mvc区域的默认页面
- 在asp.net核心mvc中集成ckeditor
- asp.net – Microsoft.Office.Interop.Excel在64位上不起作
- asp.net-mvc – Kendo UI饼图工具提示是否包含系列类别名称
- 有没有办法确保(仅)在HTTPS协议上运行ASP.NET应用程序?
- asp.net-mvc – Web api删除方法输入对象参数为null
- asp.net-mvc – 存储库层中的服务层重复功能
- ASP.NET vNext如何处理config.json中的缓存,压缩和MimeMap?
- ASP.NET 路由实现去除aspx后缀
- asp.net-mvc – Kendo ASP.NET MVC – 索引超出范围数据绑定
推荐文章
站长推荐
- 什么是IIS和Asp.Net中的应用程序池?
- asp.net-mvc – 使用实体框架的mvc中的模型和表之
- kendo-ui – 如何使用它的ASP MVC Complete Wrap
- asp.net-mvc – ASP.NET MVC RenderAction重新呈
- asp.net – 在proc中使用sp_executesql时出现“s
- asp.net – 服务器端检测页面显示在IFrame中
- asp.net-mvc – MVC使用asp.net Identity添加辅助
- 编辑asp.net razor chtml文件是否需要重新编译?
- asp.net-mvc – 使用MVC Web应用程序时Nhibernat
- asp.net-mvc-3 – Telerik MVC Grid中的自定义寻
热点阅读