diff --git a/d365fo.tools/functions/import-d365aaduser.ps1 b/d365fo.tools/functions/import-d365aaduser.ps1 index 77f16fb4..0b06f0ee 100644 --- a/d365fo.tools/functions/import-d365aaduser.ps1 +++ b/d365fo.tools/functions/import-d365aaduser.ps1 @@ -170,7 +170,8 @@ function Import-D365AadUser { [ValidateSet('Mail', 'UserPrincipalName')] [string] $EmailValue = "Mail", - [string] $TenantId + [Parameter(Mandatory = $false, Position = 16)] + [string] $TenantId = $Script:TenantId ) $UseTrustedConnection = Test-TrustedConnection $PSBoundParameters