0

Following the documentation example on microsoft for the adfs setup. ADFS microsoft setup

I have the following application .Net 4.6.

startup.cs

    app.UseMyAppApiAuthentication(config);

in the class

  //setup OpenIdConnect Authentication
  var options = config.DependencyResolver.GetService<OpenIdConnectAuthenticationAndNotificationOptions>();
  app.UseOpenIdConnectAuthentication(options);

In the options class i have

ClientId = configProvider.GetOpenIdConnectClientId();

Authority = configProvider.GetOpenIdConnectAuthority();

PostLogoutRedirectUri = configProvider.GetOpenIdConnectPostLogoutRedirectUri();

RedirectUri = configProvider.GetOpenIdConnectRedirectUri();

Notifications = new OpenIdConnectAuthenticationNotifications()
{

    AuthorizationCodeReceived = authenticationNotificationProcessor.OnAuthorizationCodeReceived,
    AuthenticationFailed = authenticationNotificationProcessor.OnAuthenticationFailed
};

where authority is

public string GetOpenIdConnectAuthority()
{
    var instance = ConfigurationManager.AppSettings["moto:AADInstance"];
    var tenant = ConfigurationManager.AppSettings["moto:Tenant"];
    return String.Format(CultureInfo.InvariantCulture, instance, tenant);
}

In the webconfig, I have the clientid and client secret set, I have the AADinstance set and tenant is blank.
If I put in the ADFS URI. I get the following error:

Authority error

Now if I edit the AADinstance and add /.well-known/Openid-configuration i get a different error...

Unable to create

I have also changed the config and removed authority and replace with "MetadataAddress" still no change. What do I need todo to resolve this issue?

Note: if I change the redirect URI to something different when running the app, I manage to get to the adfs login screen with the error that there is a mismatch with the redirect.

1 Answer 1

0

I recommend you to open a support case since it needs deep troubleshooting in order to isolate the issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.