Is your feature request related to a problem? Please describe.
Presently when a report module calls an Office 365 MFA request, many PowerShell modules will pop the MFA window "behind" the currently active window. The Microsoft Teams Module is notorious for this.
For example when calling
New-AsBuiltReport -Report Microsoft.Teams -Target 'ccb889e6-xxxx-xxxx-xxxx-d8efb6094a75' -MFA -Format Html,Word -OutputFolderPath 'C:\UcMadScientist\AsBuiltReport.Microsoft.Teams\reports' -Timestamp
Abr.Core will call the module and that module will attempt to connect to an Office365 service. Meanwhile, ABR.Core is displaying the message "Please wait while the Microsoft Teams As Built Report is being generated."
However, PowerShell has opened a new window prompting the user to log on, but it's behind the current window.
(Note the new PowerShell window indicated by the Green Arrow. This window is hiding behind VsCode)
(Same thing with PowerShell inside Windows Terminal)
This isn't an issue with ABR as it is, but something we could address in ABR.Core
Describe the solution you'd like
I guess my question is, this is simple enough for me to handle in my module (Microsoft.Teams), but I feel this is something that will affect multiple Office365 services. Should we consider adding a prompt to Abr.Core for users to check for an MFA window if $MFA is $True?
Happy to submit a PR for this.
Describe alternatives you've considered
I can easily add a Write-Host prompt to my module to prompt users to check for the window.
Is your feature request related to a problem? Please describe.
Presently when a report module calls an Office 365 MFA request, many PowerShell modules will pop the MFA window "behind" the currently active window. The Microsoft Teams Module is notorious for this.
For example when calling
New-AsBuiltReport -Report Microsoft.Teams -Target 'ccb889e6-xxxx-xxxx-xxxx-d8efb6094a75' -MFA -Format Html,Word -OutputFolderPath 'C:\UcMadScientist\AsBuiltReport.Microsoft.Teams\reports' -Timestamp
Abr.Core will call the module and that module will attempt to connect to an Office365 service. Meanwhile, ABR.Core is displaying the message "Please wait while the Microsoft Teams As Built Report is being generated."
However, PowerShell has opened a new window prompting the user to log on, but it's behind the current window.
(Note the new PowerShell window indicated by the Green Arrow. This window is hiding behind VsCode)
(Same thing with PowerShell inside Windows Terminal)
This isn't an issue with ABR as it is, but something we could address in ABR.Core
Describe the solution you'd like I guess my question is, this is simple enough for me to handle in my module (Microsoft.Teams), but I feel this is something that will affect multiple Office365 services. Should we consider adding a prompt to Abr.Core for users to check for an MFA window if $MFA is $True?
Happy to submit a PR for this.
Describe alternatives you've considered I can easily add a Write-Host prompt to my module to prompt users to check for the window.