How to install BouncyCastle for 2 step authen?

I am working on a 2 FA with using the TwoStepAuthentication.Activities.dependencies

there is an error of could not load or assembly 'BouncyCastle.Crypto Version=1.9.0.0., Culture =neutral , Public Key Token = null

I tried to replace the file of C:\Users.nuget\packages\portable.bouncycastle\1.9.0\portable.bouncycastle.19.0.nupkg, but it does not work
I would like to reinstall BouncyCastle. Can anyone help?

Thanks!
Alex

1 Like

@Alex_Ng

Welcome to the community

From manage packages check if you are able to find a package and install it

Cheers

Anil_G,

Thank you for your prompt reply. I could not find the bouncy castle from the Manage Packages - All Packages or nuget.org

Thanks!

I am try to use the below link to fix it. Thanks!

1 Like

@Alex_Ng,

If you are trying to add it into Windows compatibility project or in even in Windows Legacy also, the package should support at least .Net 4.6.x version. The version you are looking at is only supporting to .Net 4.

I need to use the bouncycastle to get the token , do you mean that I have to rollback to .Net 4 in order to make it work.

Do you have know any packages which could handle the get google token to replace the bouncy castle ? Thanks!

@Alex_Ng,

Unfortunately we can’t rollback UiPath project to .Net version 4 or any as they are dependent on the Studio version.

Sorry! I’m not aware of any for now. If you are looking for automating Google workspace then you can get an app created to interact with your google account where there is no need of 2 factor authentication.

Thanks for your explanation! Highly appreciated!!

I am working on a automation which required 2 FA to login to a website so I need to get google token which order to access into the website.

1 Like

@Alex_Ng you are welcome :slight_smile:

Do update here whatever approach you find or use. Happy learning!

You need to install the UiPath.Mail.Activities package with package version: 1.21.1. This package contains the bouncyCastle.Crypto 1.9.0.0 package.

2 Likes

Hi Alex! I am also facing the same issue after upgrading my project from windows legacy to windows and currently the uipathteam.twostep authentication package is 2.0.1 and thowing the mentioned error.

Were you able to find the solution ?

Get Google Token: Could not load file or assembly ‘BouncyCastle.Crypto, Version=1.9.0.0, Culture=neutral, PublicKeyToken=null’. The system cannot find the file specified.

If you can’t use the answer of jeroen.smits cause you need a newer version of mail.activities, then i advice to use an powershell script to create an TOTP code.

I think this is an script which works: TOTP Client for PowerShell · GitHub

We also have a Coded Workflow sample for this over here:

With a documentation entry here:

I tried this solution and it’s working. Thanks @jeroen.smits