Forum Discussion
AJWeber
Feb 20, 2019Copper Contributor
get valid auth token from MSAL for SP Online?
I'm in the middle of writing a .Net client app and have been using the latest Graph SDK to access OneDrive. To authenticate, I used MSAL and with the appropriate "scopes", this gets me an OAuth toke...
Kevin_Morgan
Feb 26, 2019Iron Contributor
Hope, the below post will help..
https://samlman.wordpress.com/2015/02/27/using-adal-access-tokens-with-o365-rest-apis-and-csom/
BTW : I have not personally tested the content listed in above post
AJWeber
Feb 26, 2019Copper Contributor
I have seen that post before. In fact, I spent quite some time searching and reading before posting here...
That post uses ADAL assembly/library. From what I have read, it is the first gen support of AD authentication developed by MSFT. While it is still being worked-on, and probably worked _with_ by many projects, we have started with MSAL, which appears to be the eventual replacement for ADAL. (Thought was, if we're starting work "today", we should use MSFT's latest library and follow its direction.)
MSAL works great to get OAuth tokens for Graph - we have that working. We can't seem to get MSAL's AD tokens to work with SP Online. Integrating another auth library (especially one with very similar classes and methods) would be a nuisance and cause confusion and reduce maintainability. Thus, I'm trying to figure out how to get MSAL to do the same.
Thank you for your reply.
That post uses ADAL assembly/library. From what I have read, it is the first gen support of AD authentication developed by MSFT. While it is still being worked-on, and probably worked _with_ by many projects, we have started with MSAL, which appears to be the eventual replacement for ADAL. (Thought was, if we're starting work "today", we should use MSFT's latest library and follow its direction.)
MSAL works great to get OAuth tokens for Graph - we have that working. We can't seem to get MSAL's AD tokens to work with SP Online. Integrating another auth library (especially one with very similar classes and methods) would be a nuisance and cause confusion and reduce maintainability. Thus, I'm trying to figure out how to get MSAL to do the same.
Thank you for your reply.