Regarding SharePoint Online REST API testing

%3CLINGO-SUB%20id%3D%22lingo-sub-1439590%22%20slang%3D%22en-US%22%3ERegarding%20SharePoint%20Online%20REST%20API%20testing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1439590%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERecently%2C%20I%20am%20testing%20several%20SharePoint%20REST%20APIs%20by%20Postman.%20but%20I%20got%20the%20%22Access%20Denied%22.%20does%20anyone%20have%20any%20idea%20on%20it%3F%3F%3F%20Thanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFirstly%3A%20Retrieve%20the%20Tenant%20ID%3C%2FP%3E%3CP%3ESecondly%3A%20Get%20Access%20Token%20and%20Copy%20the%20%22access_token%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Get%20Access%20Token.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F196421i32C923D761771379%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Get%20Access%20Token.png%22%20alt%3D%22Get%20Access%20Token.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThirdly%3A%20Access%20SharePoint%20Resource%20as%20show%20below%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Access%20SharePoint%20Resource.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F196422i150FC7525A7286E8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Access%20SharePoint%20Resource.png%22%20alt%3D%22Access%20SharePoint%20Resource.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1440883%22%20slang%3D%22en-US%22%3ERe%3A%20Regarding%20SharePoint%20Online%20REST%20API%20testing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1440883%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F180999%22%20target%3D%22_blank%22%3E%40Will%20%23%20_________%20H%3C%2FA%3EYou%20might%20have%20already%20tried%20this%20but%20every%20time%20I%20need%20postman%20setup%20somewhere%20I%20follow%20the%20below%20steps%20they%20work%20without%20issue.%20Please%20follow%20the%20below%20link%20you%20should%20be%20able%20to%20set%20it%20up%20as%20the%20request%20response%20mechanism%20has%20became%20really%20complex%20and%20this%20post%20has%20helped%20me%20a%20lot.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fglobal-sharepoint.com%2Fsharepoint-online%2Fin-4-steps-access-sharepoint-online-data-using-postman-tool%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fglobal-sharepoint.com%2Fsharepoint-online%2Fin-4-steps-access-sharepoint-online-data-using-postman-tool%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESecond%20approach%20where%20if%20I%20don't%20have%20much%20time%20I%20also%20use%20is%20this%20is%20a%20built%20in%20chrome%20app%20which%20don't%20require%20any%20additional%20authentication%20steps%20it%20can%20use%20the%20existing%20browser%20authentication%20to%20call%20and%20get%20the%20results.You%20can%20get%20the%20chrome%20extension%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Ftalend-api-tester-free-ed%2Faejoelaoggembcahagimdiliamlcdmfm%2Frelated%3Fhl%3Den%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Ftalend-api-tester-free-ed%2Faejoelaoggembcahagimdiliamlcdmfm%2Frelated%3Fhl%3Den%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3EVik%3C%2FP%3E%3CP%3EIf%20this%20post%20helps%2C%20then%20please%20consider%20%3CSTRONG%3EAccept%20it%20as%20the%20solution%3C%2FSTRONG%3E%20to%20help%20the%20other%20members%20find%20it%20more%20%3CSTRONG%3Equickly%3C%2FSTRONG%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1442098%22%20slang%3D%22en-US%22%3ERe%3A%20Regarding%20SharePoint%20Online%20REST%20API%20testing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1442098%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F394813%22%20target%3D%22_blank%22%3E%40Vikram_Samal%3C%2FA%3E%26nbsp%3BHi%20Vikram%2C%20thanks%20for%20your%20response.%20I%20will%20have%20it%20a%20try%20once%20again.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1445587%22%20slang%3D%22en-US%22%3ERe%3A%20Regarding%20SharePoint%20Online%20REST%20API%20testing%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1445587%22%20slang%3D%22en-US%22%3EIf%20you'd%20like%20to%20test%20REST%20APIs%20with%20SharePoint%2C%20I%20suggest%20using%20Fiddler%20as%20it's%20so%20easy%20to%20test%20against%20any%20SharePoint%20site%20and%20it'll%20take%20you%20just%20couple%20of%20minutes%20to%20connect%2C%20you%20can%20find%20more%20details%20in%20this%20article%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcann0nf0dder.wordpress.com%2F2016%2F09%2F12%2Fgetting-fiddler-to-work-with-sharepoint-online%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fcann0nf0dder.wordpress.com%2F2016%2F09%2F12%2Fgetting-fiddler-to-work-with-sharepoint-online%2F%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EBasically%20you%20connect%20to%20the%20site%20in%20browser%20while%20having%20fiddler%20open%2C%20it%20will%20show%20you%20what%20cookies%20were%20used%20in%20the%20request%20(rtFa%20and%20FedAuth%20cookies%20)%2C%20you%20copy%20these%20and%20use%20them%20in%20any%20upcoming%20requests.%3C%2FLINGO-BODY%3E
Highlighted
Frequent Contributor

Hi there,

 

Recently, I am testing several SharePoint REST APIs by Postman. but I got the "Access Denied". does anyone have any idea on it??? Thanks

 

Firstly: Retrieve the Tenant ID

Secondly: Get Access Token and Copy the "access_token"

 

Get Access Token.png

 

Thirdly: Access SharePoint Resource as show below

 

Access SharePoint Resource.png

 

 

3 Replies
Highlighted

@Will # _________ HYou might have already tried this but every time I need postman setup somewhere I follow the below steps they work without issue. Please follow the below link you should be able to set it up as the request response mechanism has became really complex and this post has helped me a lot.

https://global-sharepoint.com/sharepoint-online/in-4-steps-access-sharepoint-online-data-using-postm...

 

Second approach where if I don't have much time I also use is this is a built in chrome app which don't require any additional authentication steps it can use the existing browser authentication to call and get the results.You can get the chrome extension here: https://chrome.google.com/webstore/detail/talend-api-tester-free-ed/aejoelaoggembcahagimdiliamlcdmfm...

 

Thanks

Vik

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Highlighted

@Vikram_Samal Hi Vikram, thanks for your response. I will have it a try once again.

Highlighted
If you'd like to test REST APIs with SharePoint, I suggest using Fiddler as it's so easy to test against any SharePoint site and it'll take you just couple of minutes to connect, you can find more details in this article:

https://cann0nf0dder.wordpress.com/2016/09/12/getting-fiddler-to-work-with-sharepoint-online/

Basically you connect to the site in browser while having fiddler open, it will show you what cookies were used in the request (rtFa and FedAuth cookies ), you copy these and use them in any upcoming requests.