SSMS Windows authentication issue after AAD migration

Ren Valdes 0 Reputation points
2023-03-08T15:09:35.64+00:00

Machine was on an old school "name.local" domain and was migrated to AAD via Azure AD Joining the device. I then ran ProfWiz software to move the old domain profile to his new azure profile on the machine. (I believe it flips some registry keys)

Now when the user starts up SSMS, Windows authentication automatically selects his new azure profile because he is logged into it. It was previously configured for domain\username and we can't get in via the AAD\email profile he is using whether using windows or anything else. To clarify , this is a local sql instance. Any advice?

MicrosoftTeams-image (2)

Microsoft Security | Microsoft Entra | Microsoft Entra ID
SQL Server | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Zahid Butt 966 Reputation points
    2023-03-08T15:57:48.3333333+00:00
    0 comments No comments

  2. Seeya Xi-MSFT 16,676 Reputation points
    2023-03-09T02:32:26.4866667+00:00

    Hi @Ren Valdes,

    Try adding TrustServerCertificate=True; to your connection string.

    Please refer to this similar thread:
    https://learn.microsoft.com/en-us/answers/questions/663116/a-connection-was-successfully-established-with-the

    TrustServerCertificate=True and Encrypt=False are two different settings that can be used when connecting to a SQL Server database.

    • TrustServerCertificate=True: This setting instructs the client to trust the server's SSL/TLS certificate, even if it cannot be verified by a trusted third-party certificate authority (CA). This can be useful in situations where the server is using a self-signed or otherwise untrusted certificate. However, this setting can also pose a security risk if the certificate is not actually trustworthy.
    • Encrypt=False: This setting determines whether the data exchanged between the client and server is encrypted. When Encrypt=True, the data is encrypted using SSL/TLS, which helps to protect it from interception and tampering by unauthorized parties. When Encrypt=False, the data is sent over the network in plain text, which means it could be intercepted and read by anyone who has access to the network traffic.

    In summary, TrustServerCertificate=True affects how the client verifies the server's SSL/TLS certificate, while Encrypt=False determines whether the data exchanged between the client and server is encrypted. These settings serve different purposes and can be used independently of each other. It's worth noting that in most cases, it's a good idea to enable encryption to protect sensitive data, and to only use TrustServerCertificate=True if you trust the server's SSL/TLS certificate.

    Best regards,

    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.