Passing Credentials within SQL Server job

Nandan Hegde 36,146 Reputation points MVP Volunteer Moderator
2022-09-05T12:34:50.683+00:00

Hello All,
Good day!

The requirement is to execute the below powershell via SQL server job agent :
https://github.com/NickyvVr/PowerShell/blob/master/Power%20BI%20Dataset%20Refresh%20Service%20Principal.ps

237854-image.png

How can we pass this highlighted credentials into the the SQL job without hardcoding it within the server?

Or Is there any way to link Azure key vault with the SQL server job.

Note: We cannot leverage AD Account to access as MFA is enabled on every account within the organization

SQL Server Other
{count} votes

1 answer

Sort by: Most helpful
  1. CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
    2022-09-06T02:40:36.787+00:00

    Hi @Nandan Hegde ,

    Quote from MS document.

    >Azure Active Directory (Azure AD) multi-factor authentication (MFA). Azure AD MFA can be used when connecting SSMS or SqlPackage.exe to Azure SQL Database, Azure SQL Managed Instance and Azure Synapse Analytics.

    You are using on prem SQL server 2014, suggest you using SQL server authentication or windows authentication.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.