fix(launcher): strip unsupported auth params when calling Initialize-IntuneAuth
This commit is contained in:
@@ -173,8 +173,15 @@ while($true)
|
|||||||
|
|
||||||
Write-Host "`nLaunching $script ...`n" -ForegroundColor Green
|
Write-Host "`nLaunching $script ...`n" -ForegroundColor Green
|
||||||
|
|
||||||
|
# Clone params and sanitize for scripts that don't accept the full auth set
|
||||||
|
$launchParams = $commonParams.Clone()
|
||||||
|
if($script -eq "Scripts/Initialize-IntuneAuth.ps1")
|
||||||
|
{
|
||||||
|
@("AppId","Secret","Certificate","AuthMode","RedirectUri","Interactive","Mode","WhatIf") | ForEach-Object { $launchParams.Remove($_) }
|
||||||
|
}
|
||||||
|
|
||||||
# Execute in same process so TUI flows naturally
|
# Execute in same process so TUI flows naturally
|
||||||
& $scriptPath @commonParams
|
& $scriptPath @launchParams
|
||||||
|
|
||||||
Write-Host "`nPress any key to return to the menu..." -ForegroundColor DarkGray
|
Write-Host "`nPress any key to return to the menu..." -ForegroundColor DarkGray
|
||||||
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
||||||
|
|||||||
Reference in New Issue
Block a user