Hi carlintveld,
Thank you for reaching out to us on the Microsoft Q&A forum.
Could you please share the error details along with a screenshot so that we can assist you further.
Are you able to see the AADLoginForWindows extension on your VM
If the extension is not visible, please try installing it using the following CLI command, replacing <YourResourceGroup> and <YourVMName> with your actual resource group and VM name:
az vm extension set --publisher Microsoft.Azure.ActiveDirectory --name AADLoginForWindows --resource-group myResourceGroup --vm-name myVM
Please find the below document for information:
https://learn.microsoft.com/en-us/entra/identity/devices/howto-vm-sign-in-azure-ad-windows#azure-cloud-shell
If the information is helpful, please consider by clicking the "Accept answer and Upvote" on the post.
If you have any further queries, please let us know in the comment. We are glad to help you.