SSDT - Publish script for users from external provided not generated correctly

Paul Hernandez 631 Reputation points Microsoft Employee
2021-03-23T15:54:42.957+00:00

Hi everyone,

I created some users using this syntax:

CREATE USER [MY_USER] FOR EXTERNAL PROVIDER;

After a schema compare using Visual Studio 2019 Data Tools and generating a script to publish the changes I got this generated:

CREATE USER [MY_USER] WITHOUT LOGIN;

Which is not the expected behaviour.

Is this a limitation or am I missing some configuration?

Azure SQL Database
0 comments No comments
{count} votes

Accepted answer
  1. Anurag Sharma 17,571 Reputation points
    2021-03-24T07:28:39.537+00:00

    Hi @Paul Hernandez , welcome to Microsoft Q&A forum.

    I tried to follow the steps mentioned by you and was able to reproduce the issue exactly as you mentioned.

    I was trying to look for solution and I found a similar issue logged as below:

    Azure SQL Drop and Create AAD User During Every Deploy - FOR EXTERNAL PROVIDER

    Solution of it mentioned to install latest versions of VS and SSDT. After I updated both and tried to generate the script I was able to generate it properly. I then ran the script successfully on target database as well. Please check the below screenshot for the same.

    81084-image.png

    You can go to Visual Studio Installer and update the VS and SSDT. Below is the link for SSDT update:

    SSDT for Visual Studio 2019

    Please let me know if this helps or else we can discuss further.

    ----------

    If answer helps, please mark it 'Accept Answer'

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Paul Hernandez 631 Reputation points Microsoft Employee
    2021-03-24T08:29:52.287+00:00

    Hi @AnuragSharma-MSFT ,

    many thanks for the quick support. Upgrade VS and the Data Tools to the following version has solved the issue as proposed:

    81047-image.png

    Cheers,
    Paul

    0 comments No comments