Azure / avdaccelerator

AVD Accelerator deployment automation to simplify the setup of AVD (Azure Virtual Desktop) based on best practices
MIT License
324 stars 207 forks source link

Upgrade AzFilesHybrid.zip to latest (v0.2.8) to use MS Graph instead of AAD Graph #505

Closed marcosgm closed 10 months ago

marcosgm commented 11 months ago

What happened? Provide a clear and concise description of the bug, including deployment details.

Release v0.2.8: Migrate from AAD Graph to Microsoft Graph.

Powershell calls to AADGraph would fail since June 30th https://learn.microsoft.com/en-us/graph/migrate-azure-ad-graph-overview That's why the v0.2.8 is needed instead of the current 0.2.4 in zip file

Please provide the correlation id associated with your error or bug.

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

What was the expected outcome?

No response

Relevant log output

VERBOSE: [avd-mgmt-vm]:                            [[Script]DomainJoinStorage] Importing cmdlet 'Unlock-ADAccount'.\r\n
WARNING: [avd-mgmt-vm]:                            [[Script]DomainJoinStorage] Unable to acquire token for tenant \r\n
'organizations' with error 'ManagedIdentityCredential authentication unavailable. The requested identity has not been \r\n
assigned to this resource.\r\n
\r\n
Status: 400 (Bad Request)\r\n
\r\n
\r\n
\r\n
Content:\r\n
\r\n
{\"error\":\"invalid_request\",\"error_description\":\"Identity not found\"}\r\n
\r\n
\r\n
\r\n
Headers:\r\n
\r\n
Content-Length: 68\r\n
\r\n
Content-Type: application/json; charset=utf-8\r\n
\r\n
Date: Fri, 13 Oct 2023 15:39:03 GMT\r\n
\r\n
Server: IMDS/150.870.65.1103\r\n
\r\n
'\r\n
VERBOSE: [avd-mgmt-vm]: LCM:  [ End    Set      ]  [[Script]DomainJoinStorage]  in 1439.7320 seconds.\r\n
VERBOSE: [avd-mgmt-vm]: LCM:  [ End    Set      ]\r\n
VERBOSE: Operation 'Invoke CimMethod' complete.\r\n
VERBOSE: Time taken for configuration job to complete is 1464.28 seconds\r\n
DSC extension run clean up\r\n
\r\n
\r\n
"}},{"name":"StdErr","status":"success","code":0,"formattedMessage":{"lang":"en-US","message":"AzureTokenCache tokenCache, String resourceId)\r\n
                           at \r\n
Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.AcquireAccessToken(IAzureA\r\n
                        ccount account, IAzureEnvironment environment, String tenantId, SecureString password, String \r\n
                        promptBehavior, Action`1 promptAction, String resourceId)\r\n
                           at \r\n
Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.ListAccountTenants(IAzureA\r\n
                        ccount account, IAzureEnvironment environment, SecureString password, String promptBehavior, \r\n
                        Action`1 promptAction)\r\n
                           at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.Login(IAzureAccount \r\n
                        account, IAzureEnvironment environment, String tenantIdOrName, String subscriptionId, String \r\n
                        subscriptionName, SecureString password, Boolean skipValidation, IOpenIDConfiguration \r\n
                        openIDConfigDoc, Action`1 promptAction, String name, Boolean shouldPopulateContextList, Int32 \r\n
                        maxContextPopulation, String authScope)\r\n
                           at \r\n
Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass127_2.<Exec\r\n
                        uteCmdlet>b__5()\r\n
                           at System.Threading.Tasks.Task`1.InnerInvoke()\r\n
                           at System.Threading.Tasks.Task.Execute()\r\n
                        --- End of stack trace from previous location where exception was thrown ---\r\n
                           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
                           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task \r\n
                        task)\r\n
                           at \r\n
Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass127_1.<Exec\r\n
                        uteCmdlet>b__1(AzureRmProfile localProfile, RMProfileClient profileClient, String name)\r\n
                           at \r\n
                        Microsoft.Azure.Commands.Profile.Common.AzureContextModificationCmdlet.ModifyContext(Action`2 \r\n
                        contextAction)\r\n
                           at \r\n
Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.SetContextWithOverwritePromp\r\n
                        t(Action`3 setContextAction)\r\n
                           at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.ExecuteCmdlet()\r\n
                           at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()\r\n
TargetObject          : \r\n
CategoryInfo          : CloseError: (:) [Connect-AzAccount], CredentialUnavailableException\r\n
FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand\r\n
ErrorDetails          : \r\n
InvocationInfo        : System.Management.Automation.InvocationInfo\r\n
ScriptStackTrace      : at <ScriptBlock>, C:\\Packages\\DSCStorageScripts-fslogix\\Script-DomainJoinStorage.ps1: line 122\r\n
                        at <ScriptBlock>, <No file>: line 18\r\n
                        at ScriptExecutionHelper, \r\n
C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\PSDesiredStateConfi\r\n
                        guration\\DscResources\\MSFT_ScriptResource\\MSFT_ScriptResource.psm1: line 317\r\n
                        at Set-TargetResource, \r\n
C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\PSDesiredStateConfigur\r\n
                        ation\\DscResources\\MSFT_ScriptResource\\MSFT_ScriptResource.psm1: line 153\r\n
PipelineIterationInfo : {}\r\n
PSMessageDetails      : \r\n
 \r\n
    + CategoryInfo          : InvalidOperation: (:) [], CimException\r\n
    + FullyQualifiedErrorId : ProviderOperationExecutionFailure\r\n
    + PSComputerName        : localhost\r\n
 \r\n
The SendConfigurationApply function did not succeed.\r\n
    + CategoryInfo          : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException\r\n
    + FullyQualifiedErrorId : MI RESULT 1\r\n
    + PSComputerName        : localhost\r\n
 \r\n
"}}]}}]
marcosgm commented 11 months ago

See the commit for the v0.2.8 MSGraph change https://github.com/Azure-Samples/azure-files-samples/commit/1982f581ce76c335dd5f43a90d74bc965ff2d8ee

danycontre commented 11 months ago

@marcosgm thanks for your feedback, we are reviewing the issue.

danycontre commented 10 months ago

@marcosgm code was merged to update Azure files hybrid version to 2.8.

Please test and let us know if you have any comments/feedback.