Questions tagged [http-status-code-401]

Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource.

The request has not been applied because it lacks valid authentication credentials for the target resource.

The server generating a 401 response MUST send a WWW-Authenticate header field1 containing at least one challenge applicable to the target resource.

If the request included authentication credentials, then the 401 response indicates that authorization has been refused for those credentials. The user agent MAY repeat the request with a new or replaced Authorization header field2. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user agent SHOULD present the enclosed representation to the user, since it usually contains relevant diagnostic information.

See

1109 questions
5
votes
4 answers

401 - Unauthorized in IE7 only with windows authentication.

I've created an intranet site that uses windows authentication In chrome I can access the site instantly, and in FF it requires Active Directory login. But with IE7 I'm getting the following error: 401 - Unauthorized: Access is denied due to invalid…
5
votes
2 answers

Spring Boot, Spring Security returns a status 401 instead of 404 for "no mapping found for HTTP request"

I am having a project using Spring Boot and Spring Security. Spring Security validate the header with the session id for every request. If the session id is invalid or expired, an error code 401 will be returned. The session id is validated before…
5
votes
1 answer

Using Web Deploy tool for IIS - works with administrator account but not IIS or Windows user account

I am struggling with the massive beast that seems to be WMSvc - Web Management service for IIS. I am trying to deploy web sites from Visual Studio which is killing me. Actually it's killing everyone except me on my team, but since I am designated…
Max
  • 4,345
  • 8
  • 38
  • 64
5
votes
0 answers

401 Auth error while sending post request from Android App while working perfect in Postman

I am integrating exotel calling service in one of my clients android app. Api works fine in postman and receives xml response but it is not working in android app and gave volley 401 authentication error. val stringRequest = object :…
5
votes
3 answers

"Unauthorized" error when trying to call an AzureFunction from LogicApp

I have a logic app that executes a workflow by calling Azure Functions in a certain order. It was working fine for a few days, but recently it stopped working. In logic apps run (on Azure Portal) it looks like this: The output of the action that…
5
votes
0 answers

OKHTTP returns 401 error on POST request but it is working with POSTMAN

I am using OKHTTP3 to make a POST request to my server code. It returns 401 UNAUTHORIZED error. However, the same thing works on POSTMAN. The only difference between POSTMAN and my code may be a session cookie (which I am passing as a header). Below…
5
votes
1 answer

Auth basic 401 page does not prompt for credentials due to PWA service worker caching

I'm using basic auth on my dev site (e.g. dev.example.com) and I'm running into an issue where my site is not prompting me for credentials after my initial visit. In other words, if I clear my browser cache the prompt appears and I can log in just…
5
votes
0 answers

Rotativa gets 401.2 code status using windows authentication

I have an MVC 5 project which uses Windows authentication. In order of adding pdf export support, I try to set up Rotativa lib. The first try was Controller method public ActionResult PrintViewToPdf() { return new…
Laser42
  • 646
  • 2
  • 7
  • 24
5
votes
0 answers

VBA Authorization oauth2 API

Been stuck on this for a few days now. Trying to obtain access token from an API with oauth2 authentication. But I keep getting '401 Unauthorized', "Full authentication is required' My gues is i'm doing something wrong with the .SetRequestHeder…
Gregory
  • 149
  • 2
  • 5
  • 13
5
votes
1 answer

auth0 401 error after authentication while attempting auth code exchange

I'm struggling to get user info after authenticating using the auth0 PHP SDK. This is on my localhost using ngrok. I'm just using the basic example files in the SDK and I'm able to log in fine. However, after login when it re-directs to my callback…
hyphen
  • 2,368
  • 5
  • 28
  • 59
5
votes
1 answer

Laravel API Authentication (Passport) Implicit Grant Tokens - 401 error

I have a really strange problem with Laravel 5.5 Passport API Authentication. I need to permit an external site to authenticate via 'Implicit Grant Token' method and get data from the API. I'm stuck on authentication. JavaScript sends an AJAX…
5
votes
3 answers

iPhone: why i got this error --- HTTP error 401--- Twitter

hi i am developing Twitter client on iPhone, here i am using MGTwitter library and OAuthentication, i am Authenticating(sign in) and Getting Request Token, My problem is, when i send request i am getting error Request…
good guy
  • 569
  • 5
  • 11
  • 25
5
votes
3 answers

Getting status zero instead of 401 in the response

I'm sending a request to a service which requires authentication and since my current state isn't, I'm getting a 401 response. I'm trying to see if I can handle this in my code, at client side and written in Typescript: this.http.post(url, body,…
Mehran
  • 15,593
  • 27
  • 122
  • 221
5
votes
1 answer

PHP 401 status returns -1

I'm trying to return 401 response status in my AngularJS app. But in console that I see, it returns -1 What I use in php: header("HTTP/1.1 401 Unauthorized"); http_response_code(401); Also in codeigniter: $this->output->set_header('HTTP/1.1 401…
5
votes
7 answers

"Authentication not supported": jgit error when trying to clone tfs hosted git repo

When I try to clone a tfs hosted git repo http://tfstta.com:8080/tfs/DefaultCollection/_git/SampleTFSGit from my linux machine, I face the Authentication not supported error: org.eclipse.jgit.api.errors.TransportException:…