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 超時)
主站蜘蛛池模板: 杭州标识标牌|文化墙|展厅|导视|户内外广告|发光字|灯箱|铭阳制作公司 - 杭州标识标牌|文化墙|展厅|导视|户内外广告|发光字|灯箱|铭阳制作公司 | 不锈钢水箱生产厂家_消防水箱生产厂家-河南联固供水设备有限公司 | ERP企业管理系统永久免费版_在线ERP系统_OA办公_云版软件官网 | 托利多电子平台秤-高精度接线盒-托利多高精度电子秤|百科 | 圆形振动筛_圆筛_旋振筛_三次元振动筛-河南新乡德诚生产厂家 | 超声波乳化机-超声波分散机|仪-超声波萃取仪-超声波均质机-精浩机械|首页 | 河南中整光饰机械有限公司-抛光机,去毛刺抛光机,精密镜面抛光机,全自动抛光机械设备 | 深圳货架厂_仓库货架公司_重型仓储货架_线棒货架批发-深圳市诺普泰仓储设备有限公司 | 工业冷却塔维修厂家_方形不锈钢工业凉水塔维修改造方案-广东康明节能空调有限公司 | 校园气象站_超声波气象站_农业气象站_雨量监测站_风途科技 | 江门流水线|江门工作台|江门市伟涛行工业设备有限公司 | 东莞喷砂机-喷砂机-喷砂机配件-喷砂器材-喷砂加工-东莞市协帆喷砂机械设备有限公司 | 连栋温室大棚建造厂家-智能玻璃温室-薄膜温室_青州市亿诚农业科技 | 石磨面粉机|石磨面粉机械|石磨面粉机组|石磨面粉成套设备-河南成立粮油机械有限公司 | 上海新光明泵业制造有限公司-电动隔膜泵,气动隔膜泵,卧式|立式离心泵厂家 | 耙式干燥机_真空耙式干燥机厂家-无锡鹏茂化工装备有限公司 | TwistDx恒温扩增-RAA等温-Jackson抗体-默瑞(上海)生物科技有限公司 | 杭州公司变更法人-代理记账收费价格-公司注销代办_杭州福道财务管理咨询有限公司 | 生态板-实木生态板-生态板厂家-源木原作生态板品牌-深圳市方舟木业有限公司 | 江苏大隆凯科技有限公司| 浙江寺庙设计-杭州寺院设计-宁波寺庙规划_汉匠 | 盘扣式脚手架-附着式升降脚手架-移动脚手架,专ye承包服务商 - 苏州安踏脚手架工程有限公司 | 成都软件开发_OA|ERP|CRM|管理系统定制开发_成都码邻蜀科技 | 济南玻璃安装_济南玻璃门_济南感应门_济南玻璃隔断_济南玻璃门维修_济南镜片安装_济南肯德基门_济南高隔间-济南凯轩鹏宇玻璃有限公司 | 五轴加工中心_数控加工中心_铝型材加工中心-罗威斯 | 气动隔膜阀_气动隔膜阀厂家_卫生级隔膜阀价格_浙江浙控阀门有限公司 | 碳化硅,氮化硅,冰晶石,绢云母,氟化铝,白刚玉,棕刚玉,石墨,铝粉,铁粉,金属硅粉,金属铝粉,氧化铝粉,硅微粉,蓝晶石,红柱石,莫来石,粉煤灰,三聚磷酸钠,六偏磷酸钠,硫酸镁-皓泉新材料 | 国产频谱分析仪-国产网络分析仪-上海坚融实业有限公司 | 冲击式破碎机-冲击式制砂机-移动碎石机厂家_青州市富康机械有限公司 | 照相馆预约系统,微信公众号摄影门店系统,影楼管理软件-盟百网络 | 微信小程序定制,广州app公众号商城网站开发公司-广东锋火 | 仿清水混凝土_清水混凝土装修_施工_修饰_保护剂_修补_清水混凝土修复-德州忠岭建筑装饰工程 | 熔体泵|换网器|熔体齿轮泵|熔体计量泵厂家-郑州巴特熔体泵有限公司 | 杭州代理记账多少钱-注册公司代办-公司注销流程及费用-杭州福道财务管理咨询有限公司 | RO反渗透设备_厂家_价格_河南郑州江宇环保科技有限公司 | 上海电子秤厂家,电子秤厂家价格,上海吊秤厂家,吊秤供应价格-上海佳宜电子科技有限公司 | 合金耐磨锤头_破碎机锤头_郑州市德勤建材有限公司 | 矿用履带式平板车|探水钻机|气动架柱式钻机|架柱式液压回转钻机|履带式钻机-启睿探水钻机厂家 | 干粉砂浆设备_干混砂浆生产线_腻子粉加工设备_石膏抹灰砂浆生产成套设备厂家_干粉混合设备_砂子烘干机--郑州铭将机械设备有限公司 | 打造全球沸石生态圈 - 国投盛世| 中细软知识产权_专业知识产权解决方案提供商|