Gerenios / AADInternals

AADInternals PowerShell module for administering Azure AD and Office 365
http://aadinternals.com/aadinternals
MIT License
1.24k stars 214 forks source link

[Feature] Powershell on Linux support #38

Closed NgoHuy closed 1 year ago

NgoHuy commented 1 year ago

Hi Gerenios, Thank for the great tool. But when I used it on powershell on Linux, it required some registry on windows to set browser.

Should we support powershell on linux at this time?

Best regards, Severus

NestoriSyynimaa commented 1 year ago

The latest version (v0.7.2) should run on PowerShell on Linux, except for interactive logins. That is, you can get access tokens by providing credentials as a parameter, or use any non-interactive proof-of-identity (PRT, SAML, Kerberos).

NgoHuy commented 1 year ago

I think it should use default browser of OS instead.

NestoriSyynimaa commented 1 year ago

The interactive login is using various kinds of redirect urls, where the access/refresh tokens are sent. With default browser, I can't intercept those requests to capture the tokens. With Windows Forms Browser Control, I can get the tokens and close the browser before it sends tokens to the redirect url (which often is one of the Microsoft cloud services).

That's why I can't use default OS browsers. If you know a way to do that, I'd be more than happy to implement it as soon as possible!