Hello,
I am using HTTP connector in power automate to download a file from a URL and save it to a sharepoint site. The URL I am trying to access is to a sharepoint site of a different company and I originally thought it would be an issue due to permissions (got 301 and 302 error messages). Then, I tried with a file of a site I am the owner of and found it is still not working (403 error message). Just to confirm, I do have full access to the original URL on a different company's sharepoint site and I am able to access, download, sync files, etc from that site outside power automate.
Does anyone have a clue why the HTTP connector is failing?
Snapshot below uses URI to https sharepoint site link which I can access from browser with no issues:
Snapshot below is actually with URI directly to a sharepoint site for which I am the owner. No idea why it throws a 403 error message.
Any ideas / suggestions would be greatly appreciated.
Thanks in advance!
Best,
Maria
Hi Maria
I've linked a very old blog of mine which will talk you through how to make the call to SharePoint using the HTTP request. My blog deals with the setting of permissions, so you can ignore parts of it. What you will need to take from it, are the parts in the following sections:
I hope this gives you a pointer in the right direction
Thanks for the suggestion! The site I am actually trying to download the file(s) from is an external sharepoint site (not within my organization). 'Site Address' does not allow me to enter an external site address. I have tried by creating a different connection but my credentials when entering the external site are the same as when entering my company's. Also, this post suggests it is not possible to access an external site using power automate. It is an old post so hopefully this has now been implemented. How can I pass on an external sharepoint site to the 'Send an HTTP request Sharepoint'?
Thanks
Maria
Hi @mariamingallon as @yashag2255 alluded to, I don't think it's an issue with the call directly, I think it's the method of authentication that you're using. If you wanted to use the HTTP request action, then you would need to generate a bearer token from Azure AD first and pass that token in order to authenticate.
What is easier, is to use the action Send an HTTP request to SharePoint which will create a connection using the same method as if you're using any other SharePoint actions. This will save you a lot of work.
Hi @Max44
Thanks for your response. I have checked each of the error types I get when using the original URI and when using one to a SharePoint site for which I am the owner. Please see below:
1) This what I get when trying a URI from the site I am Owner of
Status code: 403
X-MSDAVEXT_Error 917656; Access+denied.+Before+opening+files+in+this+location%2c+you+must+first+browse+to+the+web+site+and+select+the+option+to+login+automatically.
Regarding the message above, when the flow is running should it not already read my connection login details. I have also used 'Basic' authentication in that case. Should I be using other type f authentication and if so, where can I get the details (tenant, etc).
2) When trying to access the original URI (in a SharePoint site of a different company but to which I have access):
Status code: 301 (moved permanently)
I actually don't get any 'error' type message in the key/value of Headers. All I get are the following keys with their associated values:
SPRequestGuid
request-id
MS-CV
Strict-Transport-Security
SPRequestDuration
SPIisLatency
MicrosoftSharePointTeamServices
X-Content-Type-Options
X-MS-InvokeApp
Date
Location
P3P
Server
X-Powered-By
Content-Length
Content-Type
Any clue as to what I should do to make the HTTP connector GET method work based on the above?
Thanks in advance for your help!
Best
Maria
I would be very grateful
The error responses are listed first by their associated HTTP status code. Within each status code, the error responses are listed by their key. The error key is the last component of the error code returned in the response. That is, each error code has the form:
urn:oracle:cloud:errorcode:messaging:error key
For example, the error with key methodNotAllowed has error code urn:oracle:cloud:errorcode:messaging:methodNotAllowed.
For each error key, we give the associated error message followed by further explanation if the error message is not self-explanatory.
Hi @yashag2255
I was not using authentication (just 'None'). Which one should I use? I have just tried 'Basic' and entered my own credentials (MS account credentials) but it is still not working. The URL is for a site I am the owner of. Please see snapshot below (error 403 Forbidden is what I get now).
Should I try any other type of authorization like oath2? If so where can get the following data:
Thanks so much for your help!
Best,
Maria
It is definitely not a problem with the GET request or the connector (I just tested and it works).
On the SP file request, how are you authenticating the request? Can you share a screenshot? Note that SP file URLs will not work if hit directly as a request and you will have to authenticate for it.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
WarrenBelz
146,658
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional