2017-02-10 11 views
0

クライアント証明書フローにMSALを使用するASP.NETコアアプリケーションを作成しようとしています。ASP.NET CoreでMSALを使用するアプリケーション専用トークンを取得するPlatformPlugin例外

NullReferenceException: Object reference not set to an instance of an object. 
Microsoft.Identity.Client.Internal.PlatformPlugin.LoadPlatformSpecificAssembly() 

認証がこのサンプルの後にモデル化されています:active-directory-dotnet-daemon-v2

マイアプリ:active-directory-dotnet-webapp-openidconnect-aspnetcore-v2

許可このサンプルの後にモデル化されたアクセストークンを取得しようとしたとき

は、私は次の例外を取得しますMail.Readアプリケーションのアクセス許可に登録されています。ここでは、例外をスローするコードは次のとおりです。

string authority = $"https://login.microsoftonline.com/{ tenantId }/v2.0"; 
ConfidentialClientApplication client = new ConfidentialClientApplication(
    authority, 
    appId, 
    redirectUri, 
    new ClientCredential(appSecret), 
    null);//new TokenCache()); 

AuthenticationResult authResult = await client.AcquireTokenForClient(
    new string[] { "Mail.Read" }, null); 
return authResult.Token; 

はまた、デーモンのサンプルのように、「https://graph.microsoft.com/.default」スコープでみました。

答えて

0

この質問に回答する。私はこれをissue on the GitHub repoとしてオープンしました。次の応答で閉じました:

この問題は、次のリリースでは発生しません。これは、単一のバイナリに移動するためです。

関連する問題