cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with fetching variables and credentials from Cloud Factory

0 Kudos

Hi,

I'm facing some issues with fetching variables and credentials from Cloud Factory. Everything worked fine for a while, but recently code stop working properly. I use the code provided by SAP in a blog post regarding Cloud Factory variables. When the code below is executed, 'Username fetch failed' message is logged. Do you have any idea why is that? Did SAP change anything in Cloud Factory API, so that this code should not work now for any reason? Of course, all variables and credentials exist in Cloud Factory environment.

Thanks!

var credDeclaration = {}; credDeclaration["XYZ"] = 
 {
    server: true
 }
 ctx.cryptography.credential(credDeclaration);
 //////////
ctx.cryptography.credentials["XYZ"].get(function (code, label, credential)  
{
   if (code === e.error.OK) 
   {
      sc.localData.cred =  
      {
          username : credential.userName.get(),
          password : credential.password.get()
      }
			rootData_Main.password=sc.localData.cred.password;
			rootData_Main.user_name=sc.localData.cred.username;
      ctx.log("LOGIN: " +sc.localData.cred.username);					
 }
 else 
 {				
	ctx.log("Username fetch failed");
 }
});

Accepted Solutions (1)

Accepted Solutions (1)

vishaldubey
Advisor
Advisor

Hi Filip,

Please have a look on the below blog's link, I hope it is helpful to you.

Configure Agents, Agent groups and Machine in SAP Intelligent RPA Cloud Factory

Best regards,

Vishal Kumar Dubey

vishaldubey
Advisor
Advisor
0 Kudos

Hi Filip,

It seems your machine is not configured in the Cloud Factory. First, you get it configured, and then you will be able to choose the Environments here.

Meanwhile for more details, please have a look on the below.

SAP Intelligent RPA – Use of Credential and Setting Activities (SAP iRPA Desktop Studio)

I will reply to you soon here with the steps required to configure Agent, Agent Groups, and Environments.

Best regards,

Vishal Kumar Dubey

filip_maleszka21
Explorer
0 Kudos

Hello Vishal,

I work alongside with Kajetan on this project. I have just checked our Agent and it turns out that we do not even have the Environment section in Agent's Settings tab to check it in the first place. Do you know why it is like that?

Best regards,

Filip

vishaldubey
Advisor
Advisor
0 Kudos

Hi Kajetan,

According to me, nothing has changed related with this because it is working for me. Please try to check your Environments (from active tenant) selected in Desktop Agent hope it is like below.

Best regards,

Vishal Kumar Dubey

0 Kudos

Hi,

thanks for Your response Vishal. In Debug mode everything works fine, the problem exists only when running the bot from Cloud Factory. Desktop Agent is configured properly in CF- it's visible in Agents tab and machine belongs to the Agent Group.

Srinivas-Rao
Contributor
0 Kudos

Hi ksmela and visdubey - What is the solution for this ? I also face the same issue. The bot just doesn't get the credentials from the cloud factory.

Thanks & Regards

Srinivas Rao.

vishaldubey
Advisor
Advisor
0 Kudos

Hi srinivas1984_rao

Please make sure that the credential name should be the same while using it in Desktop Studio. Please check the steps in Configure Agents, Agent groups and Machine in SAP Intelligent RPA Cloud Factory

SAP Intelligent RPA – Use of Credential and Setting Activities (SAP iRPA Desktop Studio)

If it is still not working then please provide the issue in detail.

Hope it is helpful.

Best regards,

Vishal Kumar Dubey

Srinivas-Rao
Contributor
0 Kudos

Hi visdubey - Yes, the variable name is exactly same. It is for the standard bot FAGLL03H. the variable name should be: FAGLL03HLogin ( though this is not given in the documentation, I found it out from the code ). It does not work. Can you please confirm if the variable that I found is correct?

Thanks & Regards

Srinivas Rao.

vishaldubey
Advisor
Advisor
0 Kudos

Hi srinivas1984_rao

As I haven't checked the said std. bot hence It is difficult to comment on the same. I would recommend checking the documentation.

Best regards,

Vishal Kumar Dubey

Answers (0)