Get IMAP Mail Message - error with credential

I have used “Get IMAP Mail Message” activity and provided the email and password in 3 ways:
1- get credential from orchestrator for email and password.
2-provide email as a variable and use “Get Password” activity.
3-provide the email and password as a variable.

All 3 ways run successfully when I run the process from the studio, but when I publish the process to orchestrator and run it from there it gives me an error with the first 2 ways.
It’s a security issue, due to encryption, but I don’t know what is the problem with that?

And secondly, what is CyberArk? Does the solution relate to it?

Thanks in advance,

#mailAutomation #mail #imap #CyberArk

Hello @Eman_Radwan,

  1. For this I guess you have used credential type of variable in Orchestrator. Like this:
    Can you show how you have used this variable in your Get IMAP Mail Message activity?
  2. As described here:
Encrypts a password by associating it with the current user. Only workflows running under the current user context can decrypt the password.

This is probably the reason why it’s not working. Question is how you are working with the project. It’s attended robot or unattended?

@Pablito Thank you for replying,
First, yes I used credential type, for email id it works fine but for the password, it gives that password field can’t be a secure string type, “I don’t know what is the idea behind that?” so I replaced it with “Get Password” activity, when running it from studio, it runs successfully, but when publishing to orchestrator and run it from there or from robot tray it gives that error:

So, I have to use the password as a variable which I don’t want.

Here is how I used “Get IMAP Mail Message” activity:

Secondly, I am using development robot with CE orchestrator.

This is what I wanted to point regarding Get-Password activity:

“Only workflows running under the current user context can decrypt the password”

So this is the reason why it fail when running from Orchestrator.

Anyway use of credential type of variable from Orchestrator should be sufficient here. Actually it is keeping password in secure string type. Why you assume that it’s not?

You mean “Get Password” activity will work fine only when using attended robot with named user license, right?

Credential type of a variable from Orchestrator is secure, but the problem with “Get IMAP Mail Message”, the password field doesn’t accept secure string type

Yes Get Password is working only for active user session instance.
My bad I have completely forgot about that get mail activities are not working on secure strings. But there is a trick for that. As a “password” property use this:

new System.Net.NetworkCredential(string.Empty, XXX).Password

XXX is in your case variable with secure.string password variable. This should work.


It works fine, thank you so much :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.