<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z000071Qs5BCASOkta Classic EngineSingle Sign-OnAnswered2024-03-25T10:56:04.000Z2021-06-15T12:02:03.000Z2021-06-18T13:42:17.000Z

eur7v (eur7v) asked a question.

Getting 403 - Forbidden: Access is denied error

Hi,

 

I have web server behind the load balancer, system successfully redirected me to OKTA login page, after entering the credentials when I and hitting the login button when OKTA server perform the callback action using

"https://www.mywebservername.com/authorization-code/callback"

 

I am getting an error "403 - Forbidden: Access is denied." You do not have permission to view this directory or page using the credentials that you supplied.

 

I am using below code in startup.cs file, my application in Blazor server

.AddOpenIdConnect(options =>

      {

        options.ClientId = Configuration["Okta:ClientId"];

        options.ClientSecret = Configuration["Okta:ClientSecret"];

        options.CallbackPath = "/authorization-code/callback";

        options.Authority = Configuration["Okta:Issuer"];

        options.ResponseType = "code";

        options.SaveTokens = true;

        options.Scope.Add("openid");

        options.Scope.Add("profile");

        options.TokenValidationParameters.ValidateIssuer = false;

        options.TokenValidationParameters.NameClaimType = "name";

        })

      .AddCookie();

 

Can you please help me to fix this problem.

 

 

Thanks

Nitin Kumar


  • User15953055057917460785 (Developer Support)

    Hi Nitin! Are you seeing any errors in your Okta system logs? (Reports -> System Log). There may be more information there on why a 403 is being returned.

This question is closed.
Loading
Getting 403 - Forbidden: Access is denied error