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

Get-D365LcsApiToken should accept secure string for password #673

Open
FH-Inway opened this issue Sep 27, 2022 · 0 comments
Open

Get-D365LcsApiToken should accept secure string for password #673

FH-Inway opened this issue Sep 27, 2022 · 0 comments

Comments

@FH-Inway
Copy link
Member

From https://www.yammer.com/dynamicsaxfeedbackprograms/threads/1934122052567040

I want to run the D365.tools script on a development server used by more than 1 person. So I want to keep the LCS user password secure.
Get-D365LcsApiToken [[-ClientId] <String>] [-Username] <String> [-Password] <String> [[-LcsApiUri] <String>] [-EnableException] [<CommonParameters>]

This command takes password as a plain text. Can we use something like below with Get-D365LcsApiToken

$UserName = “luke_keam@techgeek.biz”
$Password = Get-Content .\SecurePassword.txt | ConvertTo-SecureString
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $UserName, $Password
Send-MailMessage -Credential $Credential

Source : techgeek.biz - learn, code, contribute and make money

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant