Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Upload file to Sharepoint

Hi All,

I am automating the process to upload a file on Sharepoint (not on the intranet) site. I am using tFileFetch and got the below response header:

Status Line: HTTP/1.1 200 OK

*** Response Header ***

Cache-Control: no-store, no-cache

Pragma: no-cache

Content-Type: text/html; charset=utf-8

Expires: -1

Strict-Transport-Security: max-age=31536000; includeSubDomains

X-Content-Type-Options: nosniff

X-Frame-Options: DENY

Link: <

https://aadcdn.msftauth.net>;

 rel=preconnect; crossorigin

Link: <

https://aadcdn.msftauth.net>;

 rel=dns-prefetch

Link: <

https://aadcdn.msauth.net>;

 rel=dns-prefetch

X-DNS-Prefetch-Control: on

P3P: CP="DSP CUR OTPi IND OTRi ONL FIN"

x-ms-request-id: --------------------------------------------------

x-ms-ests-server: 2.1.12621.9 - KRSLR2 ProdSlices

X-XSS-Protection: 0

Set-Cookie: buid=0.AT0Anufhn8qzBRR7ViQUKp00fjfJvCjfyernr7fFQMAAAAAAPEPzgAAAAAAAAABAAA.AQABAAEAAAD--DLA3VO7QrddgJg7WevriI6UsgJ7fpxd-kj4edvaRfJqdSjhN0mikWtBgOBhmfR0oRVStuyIa5V9d6pV6EH3jHvAgZeXUXsxvHuZlqmFV8kmdTFX0pZM39ezgdVdCAQgAA; expires=Fri, 20-May-2022 10:35:41 GMT; path=/; secure; HttpOnly; SameSite=None

Set-Cookie: fpc=--------------------------------; expires=Fri, 20-May-2022 10:35:41 GMT; path=/; secure; HttpOnly; SameSite=None

Set-Cookie: esctx=AQABAAAAAAfnr7bD--DLA3VO7QrddxnydbgegJg7Wevre1sDTD0y1nlrheRrxQMEWC-3HwRymbeQMyZq7aqABLW4cokQ7lB4Vmi7t7H7Q1kqY1FtahA5TyRTSRJMxbBtdHHJSW8887u3sPDdGHBRBKIG-kpRzEAxKj4_yKdXUN9gK6nS4PW-VQYebBbXaWz_kHLKeAXVbdvr2Lcrq-HDQoIgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None

Set-Cookie: x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly

Set-Cookie: stsservicecookie=estsfd; path=/; secure; samesite=none; httponly

Date: Wed, 20 Apr 2022 10:35:41 GMT

Content-Length: 191875

The above response header shows the process runs but no file is uploaded.

Please guide me on what have I missed!

Labels (2)
5 Replies
gjeremy1617088143

Hi, do you use the sharepoint api with bearer token auth ?

Not applicable
Author

No, the Sharepoint owner has given rights to my email id on a folder to put a file. So I don't have a token for the authentication.

I was trying to use HTTPS protocol to post the file on that folder.

Is this not the correct way to do it?

gjeremy1617088143

https://community.talend.com/s/question/0D53p00007vCngbCAC/how-to-upload-a-file-on-microsoft-sharepoint-online

Not applicable
Author

Hi, This link gives the outline. As I am new to API calling/etc, I am not able to check what exactly are the components doing in the Job.

This is my first task in APIs in Talend so unfortunately, I am not good at understanding it.

Can you explain what exactly the components of the link are doing, like what is in tFixedFlowInput (what data is it generating)? what is the second tMap doing?

I am really confused about this job. Please help!

gjeremy1617088143

Hi you could use the first part of this tutorial to get an acess token via msGraph api :

https://talendbestpractices.com/2020/09/01/download-files-from-sharepoint-using-talend/

and go to the rest api microsoft doc for file upload :

https://docs.microsoft.com/En-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest