1

We want to upload files to SharePoint as part of CI/CD in Github (Actions). I've found how to do this using REST api, but that requires username/password. Also bearer tokens work, but we need a separate call to get them and that in turn requires username/password

Is it possible to get some kind of permanent token (I've already created an app only access token) and use it directly in the REST call?

So basically the question is: how can I upload a file to sharepoint using HTTP calls and without username/password?

1 Answer 1

0

You can do the POST operation to SharePoint online using postman tool, it does not require username and password, using the below four keys we can do this operating :

  • Client Id – will get it from the SharePoint online page.

  • Client Secret – will get it from the SharePoint online page.

  • Realm (Tenant Id) – will get it from the postman tool.

  • Access Token – will get it from the postman tool.

Using the above keys do sample upload POST operation using postman and after successful operation generate equivalent code in c# or HTTP or the language which you are comfortable with... this option is available in the postman tool.

For details steps, please refer to the below article :

In 4 steps access SharePoint online data using postman tool

2
  • Thank you, I'll test this.
    – Alireza
    Jan 21, 2020 at 11:51
  • Hi - if this has helped you, could you mark this as answered, so that it will help to the upcoming visitors.
    – SP 2022
    May 15, 2020 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.