I am looking for authentication against OneDrive For Business (#od4b) from a JavaScript implementation.
I have page that is hosted on a SharePoint Online Site Collection. Even though the user is logged on the site collection, the call to the#od4b goes into access denied when a REST Call is made to access data from#od4b.
Question 1 - Could it be because OD4B is a separate service in O365 Suite and hence the direct REST Call does not contain the necessary authentication headers when me initiate a REST Call?
If above is the case, what is the best way to get hold of authentication tokens in JavaScript. We found the following support -
https://msdn.microsoft.com/en-us/office/office365/howto/crea…
The referenced link makes use of ADAL.js to get the necessary information. However at the end it works against Azure AD.
Question 2 - If I leverage the link suggested approach would this work if we have a federated identity configured?
Regards,
Nitin Rastogi