Connecting to Microsoft using MFA

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 1 month and 2 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
Reddrgn2
Posts: 50
Last visit: Wed Sep 18, 2024 5:01 am
Answers: 1

Connecting to Microsoft using MFA

Post by Reddrgn2 »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product: PrimalScript (64 Bit)
Build: v8.1.208
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.22631

Using script to connect to multiple Microsoft services.
  1. Connect-MsolService
  2. Start-Sleep -Seconds 5
  3. Connect-AzureAD
  4. Start-Sleep -Seconds 5
  5. Connect-SPOService -Url https://-admin.sharepoint.com
  6. Connect-MicrosoftTeams
  7. #Connect-AzureAD
  8. E:\scripts\Office365\EXonlineConnection.ps1
  9. Connect-MgGraph -Scopes "User.Read.All","Group.ReadWrite.All"
  10. cd C:\
  11. cls
I tend to use daily, last time I used was Friday. Monday (yesterday) I ran updates on primalscript. Went to use today and now getting pop up about keeping account secure.
2024-09-17_11-03-44.PNG
2024-09-17_11-03-44.PNG (31.73 KiB) Viewed 986 times
I have checked my browser, edge I am using version Version 128.0.2739.79. I have checked to make sure is current version, it is. I have not uninstalled and reinstalled cause that is a pain, re-connecting and syncing and different profiles. I have confirmed that MFA for the account being used is all setup and working.

Anyone have any ideas?
Last edited by Reddrgn2 on Tue Sep 17, 2024 8:25 am, edited 1 time in total.
User avatar
brittneyr
Site Admin
Posts: 1803
Last visit: Tue Nov 05, 2024 11:31 am
Answers: 44
Been upvoted: 34 times

Re: Connecting to Microsoft using MFA

Post by brittneyr »

This is an issue with the Connect-MgGraph command, not PrimalScript.

You may find the following helpful:
https://github.com/microsoftgraph/msgra ... ssues/2732
https://github.com/microsoftgraph/msgra ... ssues/2214
Brittney
SAPIEN Technologies, Inc.
User avatar
brittneyr
Site Admin
Posts: 1803
Last visit: Tue Nov 05, 2024 11:31 am
Answers: 44
Been upvoted: 34 times

Re: Connecting to Microsoft using MFA

Post by brittneyr »

[Topic moved by moderator to PowerShell Forum]
Brittney
SAPIEN Technologies, Inc.
This topic is 1 month and 2 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked