Forum Discussion
Getting an ADAL Access Token using an Azure Registered App from Console Prog with PnP Core
- kath pattersonNov 08, 2017Iron Contributor
thanks for the comments Mikael Svenson and Hunter Willis
Mikael Svenson: in the context of writing add-ins this would make sense as the concept of app-only is well understood.
But my quandary comes when we are writing simple one time console utilities to provision SPO we are running under the initiators credentials (the provisioner) and are required to provide an access token for a specific operation as discussed in the last SIG 2nd Nov( he says "just provide an access token"). As we are running under a credential, a certificate would not be appropriate and would be overkill for 3 lines of provisioning code.
This seems to be where there is a disconnect between those discussing authentication for solutions where complex answers are appropriate and those of us sweating to do provisioning where we are advised to use an access token for API reasons, but the approach to do so is very unclear as the code is running under the provisioners credentials. eg https://blogs.msdn.microsoft.com/vesku/2016/02/15/connecting-to-sharepoint-online-from-console-application-with-adal-and-pnp-core-component/- Mikael SvensonNov 08, 2017Steel ContributorIn that case, using an SP app registration would be the easiest route instead of adal.
- kath pattersonNov 08, 2017Iron Contributorhow would that look?