pnp / pnpframework

PnP Framework is a .NET library targeting Microsoft 365 containing the PnP Provisioning engine and a ton of other useful extensions
https://pnp.github.io/pnpframework/
MIT License
204 stars 141 forks source link

Basic Authentication with username password and linux #835

Open D2O84 opened 1 year ago

D2O84 commented 1 year ago

Hi, I would like to connect to a OneDrive account to which I don't have admin access (I cannot use AzureAD or Microsoft Graph, I cannot register application), currently I'm able to use

However those doesn't work on linux

Any suggestion?

jansenbe commented 1 year ago

Without Azure AD there's only the legacy cookie based flow, that however shows a Windows Forms UI which will not work on Linux + many features will anyhow not work well using this flow. Why can't you use an Azure AD app?

D2O84 commented 1 year ago

I'm not an expert of Azure AD, but when I try to connect I get this error, note I'm not an admin on that OneDrive account, I have it through an organization image

jansenbe commented 1 year ago

You'll need to work with the admins in your org to get an Azure AD setup for you then

D2O84 commented 1 year ago

"that however shows a Windows Forms UI" That's odd, because currently I'm using

And I don't have any UI to authenticate, my application is fully automated, however it has to run on a windows server rather than on my raspberry pi

pkbullock commented 1 year ago

Hi I have managed to run PnP PowerShell on a raspberry PI, which uses this framework under the hood. If you are getting a window, then the code is asking for user login, you will need to use Azure AD app with application permissions to operate silently without user input.

Not all the capabilities are available as @jansenbe described. Thank you for raising.

bbzkfmzyjtbf commented 1 year ago

@pkbullock Any chance you could share some scripts and/or tutorial?

pkbullock commented 1 year ago

I will take a look, I have some raspberry pis. I seem to have Mia-places the PnP PowerShell one.

I'll get back to you.