spgo icon indicating copy to clipboard operation
spgo copied to clipboard

[Multi factor authentication] Using Azure AD instead of ADFS on-premise

Open CaoXue95 opened this issue 4 years ago • 9 comments

Hi SPGo team,

Good day, due to we are using Azure AD instead of ADFS on-premise, Could SPGo support multi factor authentication like this situation? Current environment:

  • SharePoint Online
  • Authentication Type (ADFS? might be) Thanks in advance!

CaoXue95 avatar Sep 14 '20 10:09 CaoXue95

Hi team, Good day, Could I know any update about this situation? thanks a lot~

CaoXue95 avatar Sep 16 '20 03:09 CaoXue95

How do you have Azure AD configured? In most cases, you should be able to authenticate with username+password and Digest authentication as described here: https://www.chrishasz.com/spgo/authentication/digest-authentication

If you do use some interactive mechanism for authentication like MFA, then there is a limitation in VSCode which doesn't allow me to load a remote web page. You may be able to setup an app password. I'm also working on support for Addin-Only authentication, but I don't have a firm date on when that would be ready.

chrishasz avatar Sep 19 '20 16:09 chrishasz

hello @CaoXue95 - SPGo supports Addin-only authentication as of version 1.7.0.

I still do not support MFA with interactive login, unfortunately.

chrishasz avatar Dec 17 '20 06:12 chrishasz

Hello @chrishasz . First of all congrats for your great work.

Is there any planned milestone including this MFA feature? I see the underlying node-sp-auth library already includes the on demand authentication mechanism, but it cannot be bypassed because SPGo keeps crashing while verifying credentials. I guess it's not that easy as accepting a new authenticationType with the appropriate authenticationDetails, right?

Jbelmonte avatar Feb 03 '21 00:02 Jbelmonte

Hello @Jbelmonte -

The barrier to supporting this right now is VSCode itself. The extension runtime actively blocks/prevents any browser windows from being opened interactively by an extension. This is the root cause that prevents me from supporting this functionality via node-sp-auth.

There are a few options that I've seen other extension authors use:

  1. Use an HTTP/Proxy library to host a website on the users's machine and proxy/iframe the interactive login window and then scrape the JWT token.
  2. Use an automation tool like Jest to run a task that opens a browser window to perform the authentication step.

Neither of these is particularly attractive. Option 1 will likely be blocked by many default or enterprise browser configurations. Option 2 requires a specific browser be installed (Chrome, FF, Brave) and I don't want to make the assumption or requirement regarding which browsers are installed on a user.

Both of these options also undermine my vision that SPGo is lightweight and unobtrusive.

I would love to support this feature and I welcome any creative suggestions for how to make it work.

chrishasz avatar Feb 06 '21 20:02 chrishasz

Understood. Thank you very much for your detailed explanation. Unfortunately I don't know how to help you to solve this situation. I guess I should explore the Addin Only authentication mechanism approach. Again, thank you @chrishasz .

Jbelmonte avatar Feb 07 '21 00:02 Jbelmonte

@Jbelmonte please let me know if you have any issues getting the app password or addin-only auth working and thank you for using SPGo!

chrishasz avatar Feb 07 '21 00:02 chrishasz

Hi @chrishasz, I don't fully understand the blocker here, but have you considered DeviceCode style authentication? I've used it in another JS project and it works well, even without a browser being involved. It just prints a URL and a code to the console and the user has to paste the code into the URL and then it sends back a token. Nice and easy.

multimeric avatar May 11 '23 04:05 multimeric

Hello @chrishasz, great extension, but the MFA support recently affected our team when security policies changed, and Digest no longer authenticates.

I wonder if the issue you described in response to @Jbelmonte on Feb 7, 2021, is still true. If I use the Powershell extension from Microsoft and issue this command: Connect-SPOService -Url https://{ourdomain}-admin.sharepoint.com/ inside VS Code, it prompts me to authenticate. I don't know enough about extension development to know if this means the issue has been resolved or if I'm misinterpreting the difference between it and SPGo.

image

Microsoft PowerShell extension

richardtj avatar Sep 21 '23 02:09 richardtj