Connect to Virtual Machine using AAD Account [closed] - azure-active-directory

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last month.
Improve this question
I am unable to login my office 365 account on my virtual machine. This my logs when I run dsregcmd /status on cmd.
I tried to edit the VM using this command, still not working.
enablecredsspsupport:i:0
authentication level:i:2
Also, I added Role assignment: Virtual Machine Administrator Login and Virtual Machine User Login
And I have this on my extension: AADLoginForWindows

I tried to reproduce the same in my environment and got the results like below:
While creating virtual machine in management Make sure to check login with Azure Ad like below:
In your virtual machine check whether extension is added:
Try to assign role assignment Virtual Machine User Login or
Virtual Machine Administrator Login to user
Now, Download Rdp file and login. When I tried to check with dsregcmd /status Azure AD joined successfully:
To Login with Azure Ad credentials account try to change Network Level Authentication access in RDP to avoid an error:
In RDP -> search box type allows remote connection to this computer -> uncheck the box like below:
Now edit your RDP downloaded file, try to include
enablecredsspsupport:i:0
authentication level:i:2
username:s:xxxxx.onmicrosoft.com (Add your username here)
domain:s:AzureAD
When I try to connect with login AzureAd\UPN with user it connected successfully like below:

Related

How to enable "sa" account in SQL Server 2019 Express after login with Windows Authentication mode [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 24 days ago.
Improve this question
I have installed SQL Server Express 2019 on my machine and after installation, I am able to login into server using the Windows Authentication method like
And as you can see the sa account has been disabled by default
So I tried to enable the sa account like
But I am getting this error message
Cannot alter the login 'sa', because it does not exist or you do not have permission.(Microsoft SQL Server, Error:15151)
Even when I tried to change the server authentication mode from Windows Authentication Mode to SQL Server and Windows Authentication Mode at
I am facing this error:
The EXECUTE permission was denied on the object 'xp_instance_regwrite', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error; 229)
So it looks like I have no/not granted any permission to do any anything! when login with Windows which apparently is my only option to get into server!(this is also happening when I tried to create new user!)
How can I get this to act as an administrator for DB when I login?
I have already seen and tried this post.
This is poor practice in the first place. If you need a local admin account you should create a different login such that attackers and automated tools won't be able to just assume the user name.
But remember: I said, "If". You can get admin/sa rights to administer the server (or create your initial local login) by logging into the computer (not the database) with the local administrator account. Then you can use using Windows Authentication from that account to access the database server as a server administrator.

Connect to MS SQL Server using Windows Authentication of a different user (in VSTO application)

When moving my SQL database from the test location to the production environment I've had to move from SQL server authentication to windows authentication. The server is setup for only "sql" login accounts to be able to access it, rather than the everyday user accounts that exist within the company.
This means that the easiest way to make a database viewing tool like DBeaver work is to "run as" your sql login and use the windows authentication dialogue via right click.
My app is an outlook addin though, and so outlook needs to run as the normal user, otherwise they get the wrong email! Is there any way to set the add-in to always run as a particular windows user, or to get it to "login" as that user when it's loaded?
The connection string to authenticate for the current user is easy enough to find on: https://www.connectionstrings.com/sql-server/
This question is answered under a question about active directory authentication here. Hopefully leaving this under the windows authentication tag here will avoid future confusion.
The answer is that it's only possible to authenticate against the "current" user, and there's no way to use a different username for different portions of software. The only way to do this is via other authentication methods.

On premise SQL Server access with credentials from Azure AD [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am trying to access local resources (database) from Azure. I want to use permissions set on Azure AD user (the AD groups) to avoid the user from gaining too much access to database data.
So, I have a Azure AD User and a web app connected to local database (on premise) through a azure hybrid connection. When I access the database Azure uses a inbuilt IIS Account instead of the signed in user (the Azure user in synchronized with local domain AD User). Is this possible, and how to accomplish this ?
Passing Azure AD user credentials to on-prem SQL Server instance is not supported yet. 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. However, It is you can pass Azure SQL database then it is possible to configure Azure SQL database with Azure AD authentication.
Note here gives more info: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-aad-authentication-configure

Connect to SQL Server Management Studio [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm new to this, and i don't understand how to do it, so i went through this tutorial here:
http://blogs.msdn.com/b/bethmassi/archive/2011/02/18/step-by-step-installing-sql-server-management-studio-2008-express-after-visual-studio-2010.aspx
And i installed everything i needed.
The point is when i get to the login form, i choose:
Windows Authentication
So it means i don't need to enter data. My problem is with the server name which by default is: (local).
I tried to do like this:
Go to SQL Server Configuration Manager > SQL Server Services > In Right Side window show all the servers which may stop. If you are using "SQLEXPRESS" then , Right click on SQL Server(SQLEXPRESS) and start. After try to connect server... I had same problem but I resolved by these steps.
But there was nothing under SQL Server Services. Someone please help me with this..
Thanks
It seems like you've only installed the client tools, so there is no local database engine to connect to. That tutorial assumed you had already installed SQL Server Express as part of Visual Studio setup.
You should uninstall the version of Management Studio you have now, IMHO. Then you need to download SQLEXPRWT_x64_ENU.exe from this link:
http://www.microsoft.com/en-us/download/details.aspx?id=43351
Run the installer, and on the feature selection screen, make sure you choose Database Engine Services as well as Management Tools - Complete. On the instance configuration screen, it should be pre-selected to SQLEXPRESS. On the database engine configuration screen, you want to make sure you have mixed authentication, enter a secure password for the sa account, and add your current user to the list of administrators. These steps will help prevent you from getting locked out of the instance if you log on as a different user or you forget the sa password.
(Sorry if I am remembering those screens out of order.)

Creating a SQL Login for Windows user

I have a .Net application that connects to a SQL Server over the network. The user logs in as the Windows user. The SQL Server is set up as Windows Authentication only. From the client machine, the user is not created on the SQL Server as a login yet. On the first startup of the application, the application needs to check if the windows user is a sql server login and if not, the login must be created by the .net application.
My question is with which user do I log in to the SQL Server to check if the login exists. Obviously it cannot be the current windows user, as this user must be created first and on first run does not exist on sql server.
I already know how to proceed once a connection is established, and need help on the correct login to use when the windows user does not exist as a login on SQL server. Keep in mind that the server is set up for Windows Authentication only.
All of this must be done through .net code (vb or c#).
Thanks for the help.
I do not fully understand your question, but answering it upon what I think you are asking:
You need to be logged in as the Administrator in Windows since you are using Windows Authentication Only.
Once you have logged in as Admin, Windows will recognise that and give you all the authentication rights so when you go into your SQL server these rights will automatically be passed on, allowing your to create new user permissions and grant access etc...
Let me know if this answers your question correctly.

Resources