Connect to Azure database with DataGrip - Active Directory - sql-server

I am trying to connect to Azure database via DataGrip using Active Directory connection (Note: not Active directory - password)
I followed accepted answer from this
I set integratedSecurity=false and authentication=ActiveDirectoryIntegrated.
When trying to connect to Test Connection I get error message
Connection to Azure SQL Database failed. Cannot set "Authetication" with "IntegratedSecurity" set to "true".
Is it some kind of bug that can be repaired, if so how could I solve this issue?
Edit:
More information:
On Azure Portal I can see that this is SQL database.
Server name ends with database.windows.net.
When I try to connect via Connection String (in Data Grip Add data from URL) generated by Azure I am not able to connect also.

The DataGrip support us using Azure Active Directory Authentication. Please see: Microsoft Azure .
You can get the connect string (URL) with Active Directory integrated authentication from Portal:
Replace the URL with the Connect string(Active Directory integrated authentication):
Hope this helps.

There is a lot of confusion around terminology here.
In short, the connection string attribute Integrated Security=true indicates you want to use "windows authentication". This type of authentication might be supported by any Azure SQL (anything whose hostname ends in database.windows.net). Azure SQL only supports Azure Active Directory authentication, butit might be possible to implement single sign on between a windows domain account and Azure Active Directory.

Related

Azure Active Directory Integrated Authentication with SQL

I'm quite new to the Azure AD. So I will be grateful for any hint.
I need to enable members of a given domain (of a given Active Directory) to log in to Azure SQL Server using Azure Active Directory - Integrated Authentication.
So far I've logged into Windows and connected it to Azure Acticve Directory in Windows Setting.
Looking through the documentation, I understand that I need to select one of the authentication methods proposed by Microsoft within Azure Active Directory. The easiest seems to be Password hash synchronization. So I would like to pick this one (But if others are simpliest I am open to change that choice)
What is the easiest way to synchronise this? Can I avoid having to create a Windows Server VM and install Azure AD Connect there?
The current configuration of AD Connect on Azure Portal looks as follows:
To mention it again, the only service I care about is logging in via Azure Active Directory
I apologise if the whole question has been wrongly structured, but it is simply based on what I have found on the forums and in the documentation.
Thanks in advance for any tips
[for example: https://youtu.be/PyeAC85Gm7w?t=565, https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-aad-configure?tabs=azure-powershell#using-an-azure-ad-identity-to-connect-using-ssms-or-ssdt, https://techcommunity.microsoft.com/t5/azure-sql-blog/azure-ad-pass-through-and-password-hash-authentication-support/ba-p/1269735]
You don't need Azure AD Connect or password hash sync unless you have an on-premise Windows Server AD that you want to sync to Azure AD. Should note that AD is not the same as Azure AD. You don't need Windows Server AD with Azure SQL, just Azure AD. To grant a certain security group access to the server, you can run CREATE USER [group-name-here] FROM EXTERNAL PROVIDER; in the Azure SQL DB. Then you can use standard SQL stuff to grant that "user" access to the DB/tables.
Users should then use Azure Active Directory - Universal with MFA as the authentication method in SQL Server Management Studio.

SSAS claimsToken is not supported

I've setup an SSAS server and I've connected it with my active directory server.
But when I try to login on the ssas server (sql server management studio) using an active directory account I get the following error:
Cannot connect to SQLASServer.
The integrated security 'ClaimsToken' is not supported for native connections. (Microsoft.AnalysisServices.AppLocal.AdomdClient)
This error shows up before it actually tries to connect or anything so if I try to login using a bogus username and no password I still get the same error.
When I login to the server with an active directory account and then login on sql server management studio using Windows Authentication it does work without any errors.
Does anybody know how I can solve this issue?
Make sure you choose Windows Authentication from the Authentication dropdown. The options that say “Active Directory” are poorly worded as they mean Azure Active Directory and are not appropriate for on premises SSAS.
If that does not solve it provide a screenshot of your connection dialog in SSMS.
my mistake was that I had chosen Azure Analysis Services from before from the first drop down menu so I was getting this error. Once I changed it to SQL database, the option to connect with Azure Active Directory was available as well as to connect through SQL database credentials. In order to use the Azure Active Directory you need to create an active directory account and set that account as admin on Azure Portal first.

Connect Local SQL Server Database using Azure Active Directory Credentials

The SQL Server (version 2016) is located in the local Virtual Machine(Windows Server 2012 R2) and I need to provide authentication for the users in the Azure Active Directory. As I am new to this I am not even sure whether it is possible or not. Can anybody guide me.
No, it is impossible. Please refer to this official document.
Connecting to SQL Server running on an Azure VM is not supported using
an Azure Active Directory account. Use a domain Active Directory
account instead.
It means if your local sql server could not use Azure Active Directory Authentication. You could use local domain Active Directory users.
If you use Azure SQL Database and SQL Data Warehouse, you could use Azure Active Directory authentication. Please refer to this link.

Azure SQL Server with Azure AD with NodeJs

I need to query Azure SQL Server using Azure Active Directory, I have tried mssql, tediuos, odbc npm's
I'm always getting the same error:
Cannot open the server {server} requested by the login.
Login failed
How to fix this?
Actually, mssql uses tedious as TDS driver, and Azure Active Directory Authentication is currently not supported by tedious. The issue has been reported here.
So, you need to switch to C# to connect Azure SQL Database with Azure AD identity.

"Account has no subscriptions" when adding new firewall rule from SQL Server Management Studio

A user is trying to connect to an Azure SQL Database via SQL Server Management Studio (SSMS v16.5.1).
The user's current IP address is not listed in the Azure SQL Server's firewall rules.
Because of this the user is shown the New Firewall Rule dialog.
When the user signs in using their Azure Active Directory (Azure AD) credentials they get an error message saying:
Account has no subscriptions
Clicking "Details" shows:
We experienced issues in connecting to Azure
Additional information:
login account does not have Azure subscriptions.
(Microsoft.SqlServer.Management.ApplicationAuthenticationManagement)
Why is the user getting this error message and how can they add a new firewall rule for their IP address?
Azure support have shared the below with me, based on an Azure documentation article.
Given an Azure SQL Server, only the Active Directory admin or SQL Server admin have permissions to add firewall rules at the server level.
The above error message (somewhat obscurely) indicates that the user is neither.
My personal experience also suggests that Azure AD accounts that are assigned as Subscription Co-administrators can also set firewall rules.
If, and only if, giving the user permissions is appropriate, this can be done by one of three ways:
Specifying the user as the SQL Server admin.
Setting the server's Active Directory admin to be an Azure Active Directory Group and making the user's AD account a member of this group.
Making the user a Co-administrator for the Subscription via https://manage.windowsazure.com/
Be sure to understand the security implications of each option before taking action.
Look at these two tutorials that will be live shortly (later on 1/13/2017):
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-control-access-sql-authentication-get-started
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-control-access-aad-authentication-get-started
These tutorials discuss using server and database level firewall rules with SQL Server authentication and Azure Active Directory authentication.
I hope these help,
Carl
In Azure Portal (https://portal.azure.com/#resource/subscriptions/{Your-GUID}/resourceGroups/AdminPortalDev/providers/Microsoft.Sql/servers/wjidentityserver/databases/{Your-DATABASE_SERVER}/overview )
Select your database
Select "Overview"
"Set server firewall" on the toolbar
Add client IP on the toolbar
Then you will be able to connect from the new IP address.
I was able to add the IP address without being administrator.
The steps in more details are described in https://learn.microsoft.com/en-us/azure/sql-database/sql-database-security-tutorial#create-a-server-level-firewall-rule-in-the-azure-portal.
Other question Client with IP addres is not allowed to access the server Azuredb describes more meaningful message and the same resolution.

Resources