cancel
Showing results for 
Search instead for 
Did you mean: 

Resource PC Command Getauthtoken

SandeepC
Level 3

I am referring to the page:

https://bpdocs.blueprism.com/bp-6-8/en-us/helpResourcePCCommands.htm?tocpath=Interface%7CAdvanced%20options%7C_____4

I can see that BP provides various resource PC commands including creating and running a session via api.
To run a process in resource PC we need to pass a token which we will get via the /getauthtoken command as mentioned in the above page.

But I am getting an invalid parameter error when I pass the request as below:

Request : http://192.168.0.123:8181/user%20name%20admin&password%20admin321&getauthtoken%20C7FXXXXX-XXXX-4804-9AAD-5284E5XXXXXX%20admin321


C7FXXXXX-XXXX-4804-9AAD-5284E5XXXXXX is the user ID

Response : 

USER SET
USER AUTHENTICATED
INVALID PARAMETERS

Can someone tell me what is wrong here?


I have also checked various other options below:

Request:
http://192.168.0.123:8181/user%20name%20admin&password%20admin321&getauthtoken%20name%20admin%20admin321

Response:
USER SET
USER AUTHENTICATED
Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

I have passed the user name instead of user ID still it does not work.

Can someone help me with this?



------------------------------
Sandeep C
IPA Specialist
Telstra
Asia/Bangalore
------------------------------
1 BEST ANSWER

Best Answers

ewilson
Staff
Staff
Hi @SandeepC,

If you connect to a runtime resource and use it's specific Help feature you'll see a different explanation of the getauthtoken option. Here's what I found:

Get an authorisation token using the provided credentials. Use either 'getauthtoken <processid> <userid> <password>' to
supply credentials for Native/SSO authentication or 'getauthtoken upn <userprincipalname> <password> <processid>' for ac
tive directory authentication. This method is available for custom solutions designed for secured networks. It is not u
sed by Blue Prism in normal operation.​

So, there's a slightly different requirement for the input params vs what the online help states. Another option is to use AutomateC to generate your authorization token and then pass that into the runtime resource via the internalauth flag.

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

View answer in original post

13 REPLIES 13

ewilson
Staff
Staff
Hi @SandeepC,

If you connect to a runtime resource and use it's specific Help feature you'll see a different explanation of the getauthtoken option. Here's what I found:

Get an authorisation token using the provided credentials. Use either 'getauthtoken <processid> <userid> <password>' to
supply credentials for Native/SSO authentication or 'getauthtoken upn <userprincipalname> <password> <processid>' for ac
tive directory authentication. This method is available for custom solutions designed for secured networks. It is not u
sed by Blue Prism in normal operation.​

So, there's a slightly different requirement for the input params vs what the online help states. Another option is to use AutomateC to generate your authorization token and then pass that into the runtime resource via the internalauth flag.

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

@ewilson . Thank you for the information. It works now. It would be great if the online documentation can be updated as everyone may land here by default.
Thanks a lot.



------------------------------
Sandeep C Specialist
Specialist
Telstra
Asia/Bangalore
------------------------------

how to use the getauthtoken method correct? 
i am trying to work via telnet with the method. i always get the message that the format is wrong: 
"Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)"

My request looks as follow: 
getauthtoken 08375907-XXXX-ZZZZ-XXXX-72DD22798B7C admin admin123 ​


somites i also get the error that the dashes are in the wrong position for GUID parsing.



------------------------------
S D
consultant
NoName
Europe/London
------------------------------

@SD,

The error you're getting is most likely due to you specifying a username instead of a user ID. The user ID is the GUID associated with the specific users account. In other words, the call to the runtime resource needs to be:

getauthtoken <processID> <user ID> <user password>

Example:
getauthtoken ​ba0c8dca-b9cd-45eb-8823-b455ee899f2c 00DF69326-66AA-4CEE-A609-00ABA3CB37B4 myPassword


Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Hi Eric, 
thank you for the quick response. I had a try on your solution: 
getauthtoken 12A064FB-XXXX-XXXX-AAAA-E64450310013 58703521-XXXX-XXXX-9352-A1E2416EAD26 admin​

The response to this request was: 

Object reference not set to an instance of an object.

Any idea what could be wrong? 

Thank you! 



------------------------------
S D
consultant
NoName
Europe/London
------------------------------

Hi @SD,

So you're doing this via telnet as opposed to through the browser? It doesn't seem to work for me on telnet, but through the browser it does. Is there a specific reason you're using telnet? If not, I'd say go the browser route. Alternatively, you can create an auth token using the AutomateC utility too.

Cheers,


------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Hi Eric, 
there is no specific reason why i am using telnet. It was the first solution. The result for the http request seems to be the same. My request looks like: 
http://xxxxx:XXX/getauthtoken%2012A064FB-XXXX-XXXX-XXXX-E64450310013%2058703521-XXXX-XXXX-XXXX-A1E2416EAD26%20admin​


Http response I get: 

Object reference not set to an instance of an object.


Any idea what could be wrong? Or it is a bug? 

Update: 
I tried the http-request solution for two different BP versions: For 6.4. the error occurs. 
For 6.9 this solution seems to work.


------------------------------
S D
consultant
NoName
Europe/London
------------------------------

I can't really say what's going on in your setup. What I can say is AutomateC never seems to fail, so you might give it a try. Open a command prompt and CD to the Blue Prism Automate folder (ex C:\Program Files\Blue Prism Limited\Blue Prism Automate). From there, try this command:

automatec /user <username> <userpass> /getauthtoken

This is what you should see:
30804.png
Once you've got the token, you can switch back to telnet or the browser to use it.

Cheers,
 


------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Hi Eric, 
thank you. Yes automatec.exe seems to work great. But when i am using the generated authtoken from automatec to run the deleteas command, i get the "User not set" notification. That's why i had a try on the telnet and http solution. The http request seems to work now! Thank you! But the deleteas command has still the same "User not set" notification.

http://xxxx:8181/deleteas%20GENERATEDTOKEN%20SESSIONID​


------------------------------
S D
consultant
NoName
Europe/London
------------------------------