How to Access Microsoft Azure SQL from a Self-Service Non-Production Environment

By Jackie Olson | September 30, 2020

Issue –

Microsoft will be removing remote desktop access to Sandbox Tier2 through Tier5 environments.

Question –

I no longer have Remote Desktop access to my sandbox environment.  How do I connect to Microsoft Azure SQL db  in my Sandbox environment?

Answer –

Microsoft provided the answer here -

Here are the detailed steps with screenshots to make it easier to follow:

In LCS project, I selected the Sandbox environment, clicked on Full details – note the environment type is “self-service”.

white out version 1

database accounts

avaliable accounts

You will notice account information and links to the machines are no longer available.

Firstly, you will need to add the IP of the machine you will be using to connect to Microsoft Azure SQL. To add your IP to the safe list, go to Maintain> Enable access, then add the IP of the machine you will be using to connect via SQL Server Management Studio (SSMS). This step adds a SQL firewall rule and the rule will expire after 8 hours.

You may install SSMS on your local machine OR alternatively, you may use the SSMS on your developer box in the project

To request access to SQL – pick one of the options in the Reason for access field -

reason for access

If you need to update the AX database for example, you will need to pick Performance tuning for AX (write to AX) and enter a reason in Details field and click Request Access.

You will need to refresh the page a couple times. Within a couple minutes you will see your temporary login information that you can use to login to SQL Azure server for your environment.

It will look something like this –

reason for access with details


The first column contains the SQL server name AND the database name in this format (separated by “\”) - dbServerName\dbName.\db_d365opsprod_ssitest_ax_20210118_05211896_e540

Then the second column is the SQL login name.

The 3rd column contains the password for the SQL login.

In this example I want to connect to that SQL Azure server from my laptop. I downloaded SSMS 18.8 to my laptop.

Download SQL Server Management Studio (SSMS) - SQL Server Management Studio (SSMS) | Microsoft Docs

Launch SSMS

In the Server Name, copy the database server name from your LCS environment’s page.  That would be everything in the first column right up to the last character before the “\”. So, in this example the Server name is –

Select SQL server Authentication for Authentication field. Then enter your login and password.

sql server message

Next, click on Options.>> button on the bottom right.

Click on the Connections Properties tab and enter the database name. (the stuff after the “server name\”

In this example, the database name is - db_d365opsprod_ssitest_ax_20210118_05211896_e540

sql server connect

Then click on Connect.

If the connection failed, check to make sure you have added the IP of the machine you are running SSMS on to Maintain> Enable access in the environment’s page in LCS.

Or if you are a partner, make sure you are not connected to another customer’s environment via VPN.


Enable just-in-time database access - Finance & Operations | Dynamics 365 | Microsoft Docs

Under the terms of this license, you are authorized to share and redistribute the content across various mediums, subject to adherence to the specified conditions: you must provide proper attribution to Stoneridge as the original creator in a manner that does not imply their endorsement of your use, the material is to be utilized solely for non-commercial purposes, and alterations, modifications, or derivative works based on the original material are strictly prohibited.

Responsibility rests with the licensee to ensure that their use of the material does not violate any other rights.

Start the Conversation

It’s our mission to help clients win. We’d love to talk to you about the right business solutions to help you achieve your goals.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!