-
Notifications
You must be signed in to change notification settings - Fork 75
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
Delinea integration - use current credentials #110
Comments
Thank you for reaching out. Could you please provide what you tried so get a starting point? |
Well, to be honest, we just got the code inside of MS Copilot and asked to rewrite it with "usedefaultcreds". What we want to achieve: At the moment each engineer is using a file of his own with the dynamic folder and we use "specify cred name" to make sharing possible. |
I checked the sample script "Thycotic Secret Server (PowerShell).rdfx" and it uses the These magic variables are getting replaced with the values configured in the dynamic folder. It is possible to use "Credentials from the parent folder" (Dynamic Folder Settings - Common - Credentials - Use credentials from parent folder). I hope I understood your usecase correctly, but creating a parent folder for each engineer with their credentials and then importing the Dynamic Folder with the sample "Thycotic Secret Server (PowerShell).rdfx" script and setting this Dynamic Folder to use the credentials from the parent folder (where the engineer set the private credentials) Please let me know if this did the trick! |
But then all engineers' passwords would be saved in one file. Using the current credential would solve this problem. |
I try to set the stage how I understood the problem: Assumption
Proposed solution
|
@eiabea |
I was thinking in a complete different direction, please excuse. If I'm on the correct path now, you are trying to use the I looked into it and came up with this proof of concept for the (original on the left, updated script on the right) $api = "$url/api/v1" | # The "winauthwebservices" part can be hardcoded here, or
$tokenRoute = "$url/oauth2/token"; | $api = "$url/winauthwebservices/api/v1"
$tokenParams = @{ | # The whole "Getting the Bearer Token part" can be omitte
grant_type = "password"; <
username = $username; <
password = $password; <
} <
<
$headers = $null <
<
If ($requiresMFA) { <
$headers = @{ <
"OTP" = Show-Prompt -prompt "Enter your OTP for M <
} <
} <
<
$tokenJSON = Invoke-WebRequest -SkipCertificateCheck -Uri <
$token = (ConvertFrom-Json $tokenJSON.Content).access_tok <
<
$headers = @{ <
"Authorization" = "Bearer $token" <
} <
$foldersRequestBody = @{ $foldersRequestBody = @{
"paging.take" = 1000; "paging.take" = 1000;
} }
$foldersJSON = Invoke-WebRequest -SkipCertificateCheck -U | $foldersJSON = Invoke-WebRequest -UseDefaultCredentials -
$folders = (ConvertFrom-Json $foldersJSON.Content) $folders = (ConvertFrom-Json $foldersJSON.Content)
I hope I finally understood your request correctly, please let me know if this is helping you out :) |
We are using the integration to Delinea. Is there a possibility to use "-usedefaultcredentials" instead of saving the creds to a RoyalTS file? This would be a great enhancement.
We tried our luck but failed.
The text was updated successfully, but these errors were encountered: