Looks like the functionality is missing from Management Studio in 2022. Here is how I do it using Azure Data Studio:
- Install Azure Data Studio
- Open Azure Data Studio
- Install the extension called Admin Pack for SQL Server
- Restart Azure Data Studio
- Setup connections for both source database (Azure) and destination (local machine)
- Execute statement in your local DB Engine on master database:
sp_configure 'contained database authentication', 1; GO RECONFIGURE;GO
- Right click on source database and select Data-tier Application WizzardSelect Export to .bacpac file [Export bacpac] (4th, last option in my current version)
- Finish the wizard
- Right click on destination database and select Data-tier ApplicationWizzard
- Select Import from .bacpac [Import bacpac] (3rd option in my version)
- Select the .bacpac file previously created and finish the wizard
After importing the logins and users are created, but their default schema isn’t set. If default shcema is required that needs to be handled manually. In that case:Open an admin connection to the local copy and run:USE [imported-db]; ALTER USER imported-user WITH DEFAULT_SCHEMA = whatever;