How do I grant permissions to my SQL Azure database to new Internal users?

Ronald Fuller 20 Reputation points
2025-01-17T21:11:26.88+00:00

Create User scripts fail in Azure Data Studio.

CREATE LOGIN [@domain.org] returns: Incorrect syntax near '@domain.org'.

Azure SQL Database
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,475 questions
{count} votes

Accepted answer
  1. NIKHILA NETHIKUNTA 4,510 Reputation points Microsoft Vendor
    2025-01-21T08:35:13.12+00:00

    @Ronald Fuller

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .

    Ask: How do I grant permissions to my SQL Azure database to new Internal users?

    Solution: User solved the issue by referring to the below document:
    https://learn.microsoft.com/en-us/sql/t-sql/statements/create-login-transact-sql?view=azuresqldb-current

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.


    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ronald Fuller 20 Reputation points
    2025-01-21T08:08:35.4733333+00:00

    Thank you Erland and Nandan. - I have fixed the title and description, and I am sorry for the non-precision of the question, I will clarify: It is an Asure SQL database, no vm or on-prem. When I say internal users I mean users I have created in Entra ID. There is no difference between work and home, as I connect the same way from both. After creating the accounts in Entra ID, I expected the accounts to be visible to Azure SQL, but the Create Login scripts failed.

    My problem was that I was using old documentation, and not understanding the need for FROM EXTERNAL PROVIDER even when granting access to internal Entra ID users.

    My problem was solved by using the correct current documentation found here.

    0 comments No comments

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.