2017-07-04 4 views
-2

私はAzureと既に開発されたアプリケーションを購読しています。私はAzure ADを認証メカニズムとして使用しようとしています。Azure AD SingleSignOnのエラー

私はAzureでアプリケーションを作成し、認証メカニズムとしてAzure ADを追加しました。ログインしようとするとこのエラーが発生します。

AADSTS65005:アプリがあなたの組織 は 『123-32323-323232-3233は』に加入したり有効にしていないことをサービス (「http://rts.powerapps.com」)にアクセスする必要があります。 IT管理者に連絡して、サービスの購読の設定を確認してください。

これはスタートアップクラスです。

public partial class Startup 
{ 

    private static string clientId = ConfigurationManager.AppSettings["ida:ClientId"]; 
    private static string aadInstance = ConfigurationManager.AppSettings["ida:AADInstance"]; 
    private static string tenant = ConfigurationManager.AppSettings["ida:Tenant"]; 
    private static string postLogoutRedirectUri = ConfigurationManager.AppSettings["ida:PostLogoutRedirectUri"]; 

    string authority = String.Format(CultureInfo.InvariantCulture, aadInstance, tenant); 

    public void ConfigureAuth(IAppBuilder app) 
    { 
     app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType); 

     app.UseCookieAuthentication(new CookieAuthenticationOptions()); 

     app.UseOpenIdConnectAuthentication(
      new OpenIdConnectAuthenticationOptions 
      { 
       ClientId = clientId, 
       Authority = authority, 
       PostLogoutRedirectUri = postLogoutRedirectUri, 
       RedirectUri = postLogoutRedirectUri, 
       Notifications = new OpenIdConnectAuthenticationNotifications 
       { 
        AuthenticationFailed = context => 
        { 
         context.HandleResponse(); 
         context.Response.Redirect("/Error?message=" + context.Exception.Message); 
         return Task.FromResult(0); 
        } 
       } 
      }); 
    } 
} 

EDIT 1:

私はこのエラーを取得し、今削除されたように私に必要なアクセス許可からいくつかのアプリを削除した後。

Error Img

EDIT 2:削除して、再度アクセス権を追加した後、固定

+0

おかげで、それは私の最初の投稿です。 –

+0

質問を投稿する前に[ツアー]を読んで[質問]を読んでください –

答えて

0

サービス( "http://rts.powerapps.com")に基づいてCommon Data Serviceを開発していたようです。あなたの組織がサービスに加入していないことを確認してください( "http://rts.powerapps.com")。

共通データサービスの前提条件に注意してください。

  1. すでにPowerAppsにサインアップした場合、あなたはPowerAppsにアクセスしてログインしてくださいすることができますあなたはまだ、あなたを署名していない場合。これらの指示に従って登録することができます。
  2. 共通データサービスデータベースを含む環境に管理者アクセス権があることを確認してください。 PowerAppsポータルにアクセスし、ページの右上にある歯車のアイコンをクリックし、管理センターをクリックします。データベースを含む環境に管理者権限を持たない場合は、次の手順に従ってデータベースを作成してください。

以下始めるのに役立つために役立つドキュメントです:

Get started with the Common Data Service SDK