pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

在名為 test113.onmicrosoft.com 的租戶中找不到名為

The application named HTTPS://test113.onmicrosoft.com/FTP was not found in the tenant named test113.onmicrosoft.com(在名為 test113.onmicrosoft.com 的租戶中找不到名為 HTTPS://test113.onmicrosoft.com/FTP 的應用程序) - IT屋-程序
本文介紹了在名為 test113.onmicrosoft.com 的租戶中找不到名為 HTTPS://test113.onmicrosoft.com/FTP 的應用程序的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我必須針對 Azure AD 對應用程序進行身份驗證.我創建了 Web API 并將其添加到 Azure AD 應用程序部分.更改了清單文件,創建了一個 Web API 并通過 Azure AD 進行了身份驗證,并創建了一個 Windows 表單,其中包含以下代碼:

I have to authenticate an application against Azure AD. I have created the web API and added it to the Azure AD application section. Changed the manifest file, created a web API and authenticated with the Azure AD and created a Windows form, containing the following code:

 private async void button1_Click(object sender, EventArgs e)
 {
    string authority = "https://login.windows.net/test113.onmicrosoft.com";
    string resourceURI = "https://test113.onmicrosoft.com/ftp";
    string clientID = "5177ef76-cbb4-43a8-a7d0-899d3e886b34";
    Uri returnURI = new Uri("http://keoftp");

    AuthenticationContext authContext =
        new AuthenticationContext(authority);
    AuthenticationResult authResult =
        authContext.AcquireToken(resourceURI, clientID, returnURI);

    string authHeader = authResult.CreateAuthorizationHeader();

    // don't do this in prod
    System.Net.ServicePointManager.ServerCertificateValidationCallback =
            ((s, c, c2, se) => true);

    HttpClient client = new HttpClient();
    HttpRequestMessage request =
        new HttpRequestMessage(HttpMethod.Get, "https://localhost:44300/api/tasks");
    request.Headers.TryAddWithoutValidation("Authorization", authHeader);
    var response = await client.SendAsync(request);
    string responseString = await response.Content.ReadAsStringAsync();
    MessageBox.Show(responseString);
}

我有一個例外:

類型異常'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException'發生在 Microsoft.IdentityModel.Clients.ActiveDirectory.dll 但未在用戶代碼中處理

An exception of type 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' occurred in Microsoft.IdentityModel.Clients.ActiveDirectory.dll but was not handled in user code

附加信息:AADSTS50001:應用程序名為在名為的租戶中找不到 https://test113.onmicrosoft.com/ftptest113.onmicrosoft.com.如果應用程序沒有發生這種情況由租戶的管理員安裝或由租戶同意租戶中的任何用戶.您可能已經發送了您的身份驗證請求錯誤的租戶.

Additional information: AADSTS50001: The application named https://test113.onmicrosoft.com/ftp was not found in the tenant named test113.onmicrosoft.com. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant.

跟蹤 ID:e782d60e-b861-46a3-b32b-f3df78396bd0相關標識:b4809815-2755-4de1-bd1b-0221d74fd0f0 時間戳:2016-03-17 11:20:08Z

Trace ID: e782d60e-b861-46a3-b32b-f3df78396bd0 Correlation ID: b4809815-2755-4de1-bd1b-0221d74fd0f0 Timestamp: 2016-03-17 11:20:08Z

推薦答案

resource in the request 是指你想在特定租戶中訪問的資源.當本機客戶端需要從 Azure Active Directory 獲取令牌時,它需要指定要為其獲取令牌的資源.在這種情況下,客戶端應用程序想要訪問 Web API,因此 Web API 的 APP ID URI 用作資源名稱.獲得令牌后,它還需要知道可以訪問資源的 URL,在這種情況下是 Web API 的地址.例如:

Resource in the request means the resource which you want to access in the particular tenant. When a native client needs to get a token from Azure Active Directory, it needs to specify the resource it wants a token for. In this scenario the client application wants access to the Web API so the APP ID URI for the Web API is used as the resource name. After it has the token it also needs to know the URL where the resource can be accessed, in this case the address of the Web API.For example:

// Resource settings this application wants to access
private string resource = "https://cloudalloc.com/CloudAlloc.WebAPI";
private Uri WebAPIUri = new Uri("https://localhost:44313");

這兩個設置都可以在 Azure 管理門戶中 Web API 應用程序的配置頁面的單一登錄部分中找到.

Both of these settings can be found in the single sign-on section of the CONFIGURE page for the Web API application in the Azure Management portal.

單擊 這里了解更多詳情.

這篇關于在名為 test113.onmicrosoft.com 的租戶中找不到名為 HTTPS://test113.onmicrosoft.com/FTP 的應用程序的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

ASP.NET Core authenticating with Azure Active Directory and persisting custom Claims across requests(ASP.NET Core 使用 Azure Active Directory 進行身份驗證并跨請求保留自定義聲明)
ASP.NET Core 2.0 Web API Azure Ad v2 Token Authorization not working(ASP.NET Core 2.0 Web API Azure Ad v2 令牌授權不起作用)
ASP Core Azure Active Directory Login use roles(ASP Core Azure Active Directory 登錄使用角色)
How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API(如何獲取守護進程或服務器到 C# ASP.NET Web API 的 Azure AD OAuth2 訪問令牌和刷新令牌) - IT屋-程序員軟件開發技
.Net Core 2.0 - Get AAD access token to use with Microsoft Graph(.Net Core 2.0 - 獲取 AAD 訪問令牌以與 Microsoft Graph 一起使用)
Azure KeyVault Active Directory AcquireTokenAsync timeout when called asynchronously(異步調用時 Azure KeyVault Active Directory AcquireTokenAsync 超時)
主站蜘蛛池模板: 酒店品牌设计-酒店vi设计-酒店标识设计【国际级】VI策划公司 | 英超直播_英超免费在线高清直播_英超视频在线观看无插件-24直播网 | 安全光栅|射频导纳物位开关|音叉料位计|雷达液位计|两级跑偏开关|双向拉绳开关-山东卓信机械有限公司 | 砂石生产线_石料生产线设备_制砂生产线设备价格_生产厂家-河南中誉鼎力智能装备有限公司 | 磨煤机配件-高铬辊套-高铬衬板-立磨辊套-盐山县宏润电力设备有限公司 | 广州中央空调回收,二手中央空调回收,旧空调回收,制冷设备回收,冷气机组回收公司-广州益夫制冷设备回收公司 | 深圳装修_店面装修设计_餐厅设计_装修全包价格-尚泰装饰设计 | 高速龙门架厂家_监控杆_多功能灯杆_信号灯杆_锂电池太阳能路灯-鑫世源照明 | 二次元影像仪|二次元测量仪|拉力机|全自动影像测量仪厂家_苏州牧象仪器 | 陕西自考报名_陕西自学考试网 | 济南展厅设计施工_数字化展厅策划设计施工公司_山东锐尚文化传播有限公司 | 即用型透析袋,透析袋夹子,药敏纸片,L型涂布棒-上海桥星贸易有限公司 | 全自动过滤器_反冲洗过滤器_自清洗过滤器_量子除垢环_量子环除垢_量子除垢 - 安士睿(北京)过滤设备有限公司 | 硫化罐-电加热蒸汽硫化罐生产厂家-山东鑫泰鑫智能装备有限公司 | 飞歌臭氧发生器厂家_水处理臭氧发生器_十大臭氧消毒机品牌 | Brotu | 关注AI,Web3.0,VR/AR,GPT,元宇宙区块链数字产业 | 锌合金压铸-铝合金压铸厂-压铸模具-冷挤压-誉格精密压铸 | 硬度计_影像测量仪_维氏硬度计_佛山市精测计量仪器设备有限公司厂家 | 食品机械专用传感器-落料放大器-低价接近开关-菲德自控技术(天津)有限公司 | 辽宁资质代办_辽宁建筑资质办理_辽宁建筑资质延期升级_辽宁中杭资质代办 | 旋振筛|圆形摇摆筛|直线振动筛|滚筒筛|压榨机|河南天众机械设备有限公司 | TTCMS自助建站_网站建设_自助建站_免费网站_免费建站_天天向上旗下品牌 | PC构件-PC预制构件-构件设计-建筑预制构件-PC构件厂-锦萧新材料科技(浙江)股份有限公司 | 济南玻璃安装_济南玻璃门_济南感应门_济南玻璃隔断_济南玻璃门维修_济南镜片安装_济南肯德基门_济南高隔间-济南凯轩鹏宇玻璃有限公司 | 氟塑料磁力泵-不锈钢离心泵-耐腐蚀化工泵厂家「皖金泵阀」 | PO膜_灌浆膜及地膜供应厂家 - 青州市鲁谊塑料厂 | 富森高压水枪-柴油驱动-养殖场高压清洗机-山东龙腾环保科技有限公司 | 流变仪-热分析联用仪-热膨胀仪厂家-耐驰科学仪器商贸 | 不锈钢轴流风机,不锈钢电机-许昌光维防爆电机有限公司(原许昌光维特种电机技术有限公司) | 卫生纸复卷机|抽纸机|卫生纸加工设备|做卫生纸机器|小型卫生纸加工需要什么设备|卫生纸机器设备多少钱一台|许昌恒源纸品机械有限公司 | 天津仓库出租网-天津电商仓库-天津云仓一件代发-【博程云仓】 | 台湾HIWIN上银直线模组|导轨滑块|TBI滚珠丝杆丝杠-深圳汉工 | 河南新乡德诚生产厂家主营震动筛,振动筛设备,筛机,塑料震动筛选机 | 一体化污水处理设备-一体化净水设备-「山东梦之洁水处理」 | 胶水,胶粘剂,AB胶,环氧胶,UV胶水,高温胶,快干胶,密封胶,结构胶,电子胶,厌氧胶,高温胶水,电子胶水-东莞聚力-聚厉胶粘 | 传递窗_超净|洁净工作台_高效过滤器-传递窗厂家广州梓净公司 | 玉米深加工设备-玉米深加工机械-新型玉米工机械生产厂家-河南粮院机械制造有限公司 | 诺冠气动元件,诺冠电磁阀,海隆防爆阀,norgren气缸-山东锦隆自动化科技有限公司 | 螺杆真空泵_耐腐蚀螺杆真空泵_水环真空泵_真空机组_烟台真空泵-烟台斯凯威真空 | 清管器,管道清管器,聚氨酯发泡球,清管球 - 承德嘉拓设备 | 防爆电机_防爆电机型号_河南省南洋防爆电机有限公司 |