私のアプリケーションでAzure Active Directoryに接続しようとしていますが、このエラーが発生します。 要求の処理中に未処理の例外が発生しました。OpenIdConnectAuthenticationHandler:message.Stateがnullまたは空です。 Azure Active Directoryに接続するとき
Exception: OpenIdConnectAuthenticationHandler: message.State is null or empty. Unknown location
AggregateException: Unhandled remote failure. Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.d__5.MoveNext()
マイappsettings.jsonファイルは次のようになります。私は私のプロジェクトでSSLを有効にし、そのビジュアルのURLを追加しました
"AzureAd": {
"ClientId": "<Application ID value from Azure Portal>",
"AadInstance": "https://login.microsoftonline.com/{0}",
"TenantId": "<tenant>.onmicrosoft.com",
"AuthCallback": "/"
}
とStartup.cs
app.UseCookieAuthentication();
app.UseIdentity();
app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions
{
ClientId = Configuration["AzureAd:ClientId"],
Authority = string.Format(Configuration["AzureAd:AadInstance"], Configuration["AzureAd:TenantId"]),
CallbackPath = Configuration["AzureAd:AuthCallback"]
});
でスタジオは私を返信URLとして提供します。
誤ったURLが設定されていたときは、URLが登録済みのものと一致しないと言われたMicrosoftのログインサイトにつながってしまいました。
私はthis postをフォローしていたが、新しいポータルを使用していたとも言える。私は古典的なポータルにアクセスできない。
このエラーを解決するにはどうすればよいですか?
ありがとうございました。
この問題は修正されましたか? –