skip to Main Content

An Azure Webapp incorporating Python and Streamlit which has a file upload element is working well in a personal Azure account however once uploaded and operational within an account that is corporate and includes such things as A.D. and B2C any file upload attempt results in:

AxiosError: Request failed with status code 403

Resolutions around:

"--server.enableXsrfProtection=false" 

being added do not seem appropriate as the application works without it in "Test" and this appears to be a server side error, i.e.:

"Forbidden response status indicates the server understands a request but refuses to authorize it."

It "seems" possibly this around roles or permission issues, possibly even firewall issues but I’m looking for something to focus on, a more definite direction.

Can you help?

2

Answers


  1. The server can’t authenticate you. Possibly you need to add withCredentials to the Axios Request and send the credentials to the API.

    axios.post('https://server:3333/endpoint', {
       withCredentials: true,
    }).then((res) => console.log(res));
    

    See https://axios-http.com/docs/req_config for more information.
    Maybe that will help.

    Login or Signup to reply.
  2. Corporate environments tend to have PIM(Microsoft Entra Privileged Identity Management) https://learn.microsoft.com/en-us/entra/id-governance/privileged-identity-management/pim-configure enabled. In these kind of environments you must request access for your account before you are allowed to do any write and sometimes read operations.

    It is possible that that is causing the permission issues if of course you have successfully added ”withCredentials” in the request.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search