User can not log onto Azure Sql Server

Tom Burke 0 Reputation points
2025-02-20T00:54:44.1+00:00

Users can not log on to SQL Server.
Only the Admin account can access the server.
I have created the users and given them roles.

The users show up in the database correctly but the logons do not work.

Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. Vijayalaxmi Kattimani 1,485 Reputation points Microsoft Vendor
    2025-02-21T08:39:16.1433333+00:00

    Hi @Tom Burke,

    Login failed for user 'Tom.Burke'. (Microsoft SQL Server, Error: 18456)

    Considering the error message you have shared, we would like to inform you that, the login (whether using SQL Authentication) does not exist. it likely means that the login hasn't explicitly been given access to SQL Server – which may mean it is not a member of an appropriate domain group. It could also mean that you have created a server-level login, mapped a database user with a different name to that login, and are trying to connect using the username, not the login name.

    I am able to reproduce the issue and obtain a result.

    User's image Please follow the steps mentioned below to log in with a new user.

    Step1: Ensure that a server-level login has been created and that you are attempting to log in using the appropriate username.

    step2: Create a login with a password explicitly using the below code.

    CREATE LOGIN <loginname> WITH password=<password>;

    Ex: CREATE LOGIN readonlylogin WITH password='1231!#ASDF!a';

    Step 3: Please attempt to log in using the provided login name and password.

    Please refer the below mentioned link for more information.

    https://sqlblog.org/2020/07/28/troubleshooting-error-18456

    I hope, This response will address your query and helped you to overcome on your challenges. If this answers your query, do click Accept Answer and Yes for was this answer helpful.

    If the issue still persists, please let us know here. We will respond with more details and try to help you.

    0 comments No comments

  2. PratikLad 80 Reputation points Microsoft Vendor
    2025-02-25T10:18:36.3366667+00:00

    Hi @Tom Burke,

    Login failed for user 'Tom.Burke'. (Microsoft SQL Server, Error: 18456)

    As per the error message below are the reasons can cause the issue:

    • Invalid user ID
    • Wrong password
    • Login disabled
    • Login valid, but server access denied
    • Login valid, but the default database is unavailable
    • Login requires a password change

    To resolve this, ensure that a server-level login has been created and that you are attempting to log in using the appropriate user which is associated with that login.

    Ensure your login is enabled. If it is disable it will get affected for all the users that are associated with it.

    
    ALTER LOGIN loginname DISABLE/ENABLE
    
    

    When you are connecting to Azure SQL via SSMS add the database name you want to connect in connection properties as below:

    enter image description here

    And make sure the user you are using should belong to that database only.

    Message: AADSTS900021: Requested tenant identifier '00000000-0000-0000-0000-000000000000' is not valid. Tenant identifiers may not be an empty GUID.

    The above message you get when you have not added Microsoft Entra ID to the Azure SQL server as below but you are trying to connect the Azure SQL server with Azure Entra Id.

    enter image description here

    You can refer below documents:

    https://sqlstudies.com/2020/05/20/connecting-to-azure-sql-database-requested-tenant-identifier-00000000-0000-0000-0000-000000000000-is-not-valid/

    https://azure.microsoft.com/en-us/blog/adding-users-to-your-sql-azure-database/


    I hope, This response will address your query and helped you to overcome on your challenges. If this answers your query, do click Accept Answer and Yes for was this answer helpful.

    If the issue still persists, please let us know here. We will respond with more details and try to help you.


Your answer

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