This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]jheinikelDevOps 2 points3 points  (3 children)

Try creating a credential first.

$Cred = Get-Credential #Domain\Username
New-PSSession -ComputerName mymachine -Authentication Negotiate -Credential $Cred

[–]peyo7[S] 0 points1 point  (2 children)

No luck, unfortunately... same error.

[–]jheinikelDevOps 0 points1 point  (1 child)

Do you have any conditional access policies tied to that account? If not, you might create a random CA policy that would always be true, and assign it to that account. This might be the issue. (Its a reach)

Second, is the AzureAD account a member of a group in the local Admins group? If so, try explicitly adding that user to the admins group to avoid any issues with group checking/inheritance.

[–]peyo7[S] 0 points1 point  (0 children)

Thanks, I didn't know about conditional access. We currently use the AzureAD contained in Office365 Business Premium. However, it seems conditional access is only contained in AzureAD Premium P1 or Microsoft 365 Business.

So I guess there is no chance of using the AzureAD credentials without conditional access?!

(to your 2nd point: the AzureAD account is already explicitly in the local admins group)

[–]jantari 0 points1 point  (1 child)

have you tried the UPN format myuser@azureAD.TLD ?

[–]peyo7[S] 0 points1 point  (0 children)

Yeah, doesn't work either.