Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MFA for dbatools #5593

Merged
merged 28 commits into from May 26, 2019

Conversation

Projects
None yet
1 participant
@potatoqualitee
Copy link
Member

commented May 24, 2019

Universal with MFA using parameters

"clientsecret" | clip
$cred = Get-Credential guid-app-id-here # appid for username, clientsecret for password

Connect-DbaInstance -SqlInstance psdbatools.database.windows.net -Database abc -SqCredential $cred -Tenant guidheremaybename

Universal with MFA using configs

"clientsecret" | clip
$cred = Get-Credential guid-app-id-here # appid for username, clientsecret for password

Set-DbatoolsConfig -FullName azure.tenantid -Value 'guidheremaybename'
Set-DbatoolsConfig -FullName azure.appid -Value $cred.Username
Set-DbatoolsConfig -FullName azure.clientsecret -Value $cred.Password # requires securestring
Set-DbatoolsConfig -FullName sql.connection.database -Value abc

Connect-DbaInstance -SqlInstance psdbatools.database.windows.net -AuthenticationType 'AD Universal with MFA Support'

Managed Identity in Azure VM with .NET 4.7.2+

Connect-DbaInstance -SqlInstance psdbatools.database.windows.net -Database abc -AuthenticationType 'AD Universal with MFA Support' 

Managed Identity in Azure VM without .NET 4.7.2+

$cred = New-Object System.Management.Automation.PSCredential ("appid","clientsecret")

Connect-DbaInstance -SqlInstance psdbatools.database.windows.net -Database abc -SqCredential $cred -Tenant guidheremaybename

AAD username and pass

Connect-DbaInstance -SqlInstance psdbatools.database.windows.net -SqlCredential username@acme.onmicrosoft.com -Database dbatools

AAD Integrated auth

Connect-DbaInstance -SqlInstance psdbatools.database.windows.net -Database dbatools

for help with managed identities

potatoqualitee added some commits May 23, 2019

fix
@potatoqualitee

This comment has been minimized.

Copy link
Member Author

commented May 26, 2019

still needs examples in the code

@potatoqualitee potatoqualitee marked this pull request as ready for review May 26, 2019

@potatoqualitee

This comment has been minimized.

Copy link
Member Author

commented May 26, 2019

going to do touchups in next PR

@potatoqualitee potatoqualitee merged commit e5ec5d5 into prerelease May 26, 2019

2 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@potatoqualitee potatoqualitee deleted the mfa branch May 26, 2019

@potatoqualitee potatoqualitee referenced this pull request May 27, 2019

Closed

AccessToken notes #5445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.