![]() It’s also long been a security risk compared to (A)AD authentication. I won’t go over this as it’s not AAD and has long been well-documented. ![]() *I know, ADAL has been superceded by MSAL, I’ll cover that next time. Note – I’ve omitted try/catch logic from the code snippets for clarity, of course they should be used when acquiring tokens, connecting, running queries etc. I’ll demo examples for connecting via AAD with either Powershell or. So I thought I’d try and distil this information into one post covering everything. I recently spent a not-insignificant amount of time figuring out the methods and limitations of doing this as part of the never-ending DBA quest for automation, not helped by somewhat patchy documentation and not being able to find a central resource on the topic. With Azure SQL DB, although SQL authentication remains simple, Azure Active Directory introduces additional complexity. ![]() ![]() NET SqlConnections support Integrated Security=SSPI in a connection string – just run your code with an authorised service account et voila. NET code is an easy and long-established task – Invoke-SqlCmd just works and. On-prem, connecting to SQL Server with AD authentication from Powershell or.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |