How to Connect to SharePoint from Mac with MFA in PowerShell?

0
21
Asked By TechNinja123 On

I'm trying to find the best way to connect to SharePoint from my Mac using PowerShell and VS Code, especially since my account has multi-factor authentication (MFA). I've attempted to keep a notes page with connection commands, but I find that I don't use PowerShell often enough. When I do use it, the commands feel outdated. Can anyone share the correct commands or point me to a resource?

I've created applications in Entra, but I keep facing issues like a verification loop when executing commands such as: Connect-PnPOnline -Url "https://domain.sharepoint.com" -DeviceLogin -ClientId "". It's frustrating because I probably waste a day each month trying to establish these connections. Is there a master list of reliable commands?

4 Answers

Answered By DebugDude71 On

What errors are you getting? Share the command and the error message so we can help you troubleshoot.

Answered By ScriptingSage88 On

The command interface can feel dated at times, yes. You're not alone on that one!

Answered By WindowsWarrior22 On

Have you tried different login methods? Besides `-Interactive` and `-DeviceLogin`, there are other options like `-OSLogin` and various token and certificate methods. The [documentation](https://pnp.github.io/powershell/articles/authentication.html) has a good overview of these.

Answered By CodeExplorer99 On

You might want to try using the interactive login method instead:
```
Connect-PnPOnline -Url "https://domain.sharepoint.com" -Interactive -ClientId ""
```
Check out the [official documentation](https://pnp.github.io/powershell/articles/authentication.html) for more options.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.