How to generate access token for Share point REST API in ICS
Summary
Developing integration to upload file on share point using share point REST APIContent
Hello,
I am developing integration to upload files to microsoft share point. There are 2 steps to upload file to share point.
1) generate access token
2) call REST API using access token.
currently I am using following POST REST API to generate access token.
https://accounts.accesscontrol.windows.net/231dd9cd-ddc7-5fgf-ae78-9f4ac3c912e7/tokens/OAuth/2
below are the request payload for the REST API.
<nsmpr2:grant_type>client_credentials</nsmpr2:grant_type> <nsmpr2:client_id>8d93d6a6-861a-4394-aa24-fb4a60a975ce@123dd9cd-ddc7-4fba-ae78-9f4ac3c912e7</nsmpr2:client_id> <nsmpr2:client_secret>YgLYsm8mMKaY3phiW5+BQ2taOkBO0Ujg+UJ7OUTfYlw=</nsmpr2:client_secret> <nsmpr2:resource>00000003-0000-0ff1-ce00-000000000000/hitachiconsulting.sharepoint.com@231dd9cd-ddc7-4fba-ae78-9f4ac3c912e7</nsmpr2:resource>