I found a solution on the internet for this issue and it worked for me.
AxiosError: Request failed with status code 403
I am using a python and streamlit code to upload files to Azure Web App so that I can interact with the files. Each time I upload any file to the website, I hit an error: AxiosError: Request failed with status code 403.
I have added all the necessary permissions from Microsoft Graph portal including APIConnectors...., ExternalConnection...., IndustryConnector-DataConnector, but I am still getting the same error.
Anyone had this issue and found a solution to it?
Thanks,
Samuel
Microsoft Security Microsoft Graph
2 answers
Sort by: Most helpful
-
samuel chazy 15 Reputation points
2023-07-06T05:33:44.8366667+00:00 -
seadude 111 Reputation points
2024-08-18T22:34:13.8233333+00:00 It feels insecure to me turning offthe
enable cross-site-scripting protection
. There has to be a better way.The issue is due to (in my case) EntraID Authentication set on the Web App.
- When I run the Streamlit code locally, the upload to Azure Storage works fine
- Its only when I try to upload from the Web App-hosted URL that if fails.
I tried:
- Enabling CORS
- Checking the
Enable Access-Control-Allow-Credentials
box - Adding the Web App as an Allowed Origin
- Even restarting the Web App after this... nothing has worked so far.
@Microsoft, could you assist us to fix this in a secure manner?
Thank you