OSDeploy / OSDCloud

OSDCloud is a process to fully deploy a Windows OS from a WinPE Environment
https://osdcloud.osdeploy.com
63 stars 14 forks source link

Start-OSDCloudREAzure fails with "Method Not Found" error and does not pop up authentication diaglog #37

Open kevinmccurdybrd opened 7 months ago

kevinmccurdybrd commented 7 months ago

Start-OSDCloudREAzure [+] functions.osdcloud.com 24.2.22.1 (Windows Phase)

Connect-OSDCloudAzure [+] functions.osdcloud.com 24.2.22.1 (Windows Phase) [+] AzureAD 2.0.2.182 [+] Az.Accounts 2.17.0 [+] Az.KeyVault 5.2.2 [+] Az.Resources 6.16.1 [+] Az.Storage 6.1.3 [+] Microsoft.Graph.Authentication 2.17.0 [+] Microsoft.Graph.DeviceManagement 2.17.0 Connect-AzAccount : Method not found: 'System.Threading.Tasks.Task`1 Azure.Identity.InteractiveBrowserCredential.AuthenticateAsync(Azure.Core.TokenRequestContext, System.Threading.CancellationToken)'. At C:\Program Files\WindowsPowerShell\Modules\OSD\24.4.1.1\Public\OSDCloudAzure\Connect-OSDCloudAzure.ps1:32 char:9

Hard locking the Graph Auth Module and OSD to specific versions (2.15.0 and 24.3.27.1 respecively) appears to resolve the issue. It appears that Install-Module is installing 24.2.22.1 by default instead of the 24.3.27.1 version for some reason

I'm not convinced this is a version issue (at least one machine had a default browser of internet explorer, and ancient imaging setting we used to enforce yesteryear, which I'm sure causes all kind of issues)

For now I'm opening this issue for tracking purposes.

kevinmccurdybrd commented 7 months ago

Some more information, I think it's related specifically to "Connect-AzAccount -AuthScope Storage" If I run Connext-AzAccount with no additional parameters prior to invoking Start-OSDCloudREAzure it appears to cache a token properly and then the subsequent run through of Start-OSDCloudREAzure completes successfully after selection of the appropriate subscription. Could we consider allowing parameterizing of the subscription/tenant ID's to achieve a no-click?