From 04e95250eb69cbad008adcb7ae9fafc25ea2b69c Mon Sep 17 00:00:00 2001 From: Florian Hopfner Date: Sun, 10 Nov 2024 11:14:41 +0100 Subject: [PATCH] replace alias --- d365fo.tools/functions/import-d365aaduser.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d365fo.tools/functions/import-d365aaduser.ps1 b/d365fo.tools/functions/import-d365aaduser.ps1 index e8da6703..8f139be9 100644 --- a/d365fo.tools/functions/import-d365aaduser.ps1 +++ b/d365fo.tools/functions/import-d365aaduser.ps1 @@ -208,11 +208,11 @@ function Import-D365AadUser { Write-PSFMessage -Level Verbose -Message "Trying to connect to the Azure Active Directory with tenant id '$TenantId'" if ($PSBoundParameters.ContainsKey("AzureAdCredential") -eq $true) { - Login-AzAccount -Credential $AzureAdCredential -ErrorAction Stop -TenantId $TenantId + Connect-AzAccount -Credential $AzureAdCredential -ErrorAction Stop -TenantId $TenantId } else { if ($SkipAzureAd -eq $false) { - Login-AzAccount -ErrorAction Stop -TenantId $TenantId + Connect-AzAccount -ErrorAction Stop -TenantId $TenantId } } }