Forum Discussion
praveen rengarajan
Aug 09, 2017Copper Contributor
O365 access token: image not loading until login in actual SP
Authenticating the user using O365 API, using that token again am getting SharePoint resource token.There is no problem until here.
https://xx.sharepoint.com/sites/SC/_api/web/lists/getByTitle(\'Announcements\')/items/?$orderby=Published_x0020_Date desc
Able to get entire list and column data. https://i.stack.imgur.com/Wgc8d.pngBut, the actual problem is, the image in the body content is not displaying until I logged in SharePoint site in the same browser. Why? It's unable to get resource files from SharePoint using O365 SharePoint access token.
1 Reply
- The token would work o2f you requested the image using the api. But the browser performs log in via a cookie.
Do users log into the location where your code runs? If your app uses AAD for auth, the user should have a cookie.