---
title: "Discussion on \"Generating TOTPs for CyberArk (now Idira) Privileged Session Manager Webapp Connectors using a PreConnect DLL\" | Hashnode"
description: "Discussion on \"Generating TOTPs for CyberArk (now Idira) Privileged Session Manager Webapp Connectors using a PreConnect DLL\". With version 13.0 of CyberArk (now Idira)'s Privileged Session Manager, as part of a Webapp PSM connector, you can inject a time-based one-time password. You can even store the secret for the TOTP in"
url: "https://hashnode.com/posts/generating-totps-for-cyberark-privileged-session-manager-webapp-connectors-using-a-preconnect-dll/652817e761fd3a89becd3fe7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Generating TOTPs for CyberArk (now Idira) Privileged Session Manager Webapp Connectors using a PreConnect DLL](https://timschindler.blog/generating-totps-for-cyberark-privileged-session-manager-webapp-connectors-using-a-preconnect-dll?utm_source=hashnode&utm_medium=feed)

With version 13.0 of CyberArk (now Idira)'s Privileged Session Manager, as part of a Webapp PSM connector, you can inject a time-based one-time password. You can even store the secret for the TOTP in

Oct 12, 2023 · 4 min read · timschindler.blog  
Updated Jun 16  
Read the article

-   [#cyberark](https://hashnode.com/tag/cyberark)
-   [#cybersecurity-1](https://hashnode.com/tag/cybersecurity-1)
-   [#mfa](https://hashnode.com/tag/mfa)
-   [#privileged-session-manager](https://hashnode.com/tag/privileged-session-manager)
-   [#privileged-access-management](https://hashnode.com/tag/privileged-access-management)
-   [#idira](https://hashnode.com/tag/idira)

## Written by

[Tim Schindler](https://hashnode.com/@timschindler)

@timschindler · Amsterdam, NL

  
[View profile](https://hashnode.com/@timschindler)

Idira (CyberArk) MVP, Guardian | Principal Consultant at CyberIAM

Originally from the USA, working in Amsterdam, Netherlands in the digital identity space.

## Responses 1

Markdown supported · ⌘↵ to post

[Belén Rodriguez Salazar](https://hashnode.com/@beldruxs)

[Nov 27, 2023](https://hashnode.com/posts/generating-totps-for-cyberark-privileged-session-manager-webapp-connectors-using-a-preconnect-dll/652817e761fd3a89becd3fe7/comment/65648173b4e3eb72c57ff222)

Hi, I have follow the steps from the article, however it doesn´t work, page responds saying that the code is invalid. Could it be because in the webformfields you use MfaCode instead of MFACode as in the code?

[Tim Schindler](https://hashnode.com/@timschindler)

[Nov 27, 2023](https://hashnode.com/posts/generating-totps-for-cyberark-privileged-session-manager-webapp-connectors-using-a-preconnect-dll/652817e761fd3a89becd3fe7/comment/65648173b4e3eb72c57ff222#reply-6564deb5836b61ed3637256a)

What is the generated TOTP ? Is it actually an OTP? You can see this by injecting the OTP into a field that isn’t obscured, like the username field.

Failing that, can you generate a valid TOTP manually with the secret stored as the logon account’s password (when you show/copy the secret out of CyberArk?) When you generate it manually, is it the same as what the Preconnect DLL generates ?

If you have the ability to do so, you can clone the example code from GitHub, add debug logging, and recompile.
