MFA secret key issue
DotaABhash opened this issue · 8 comments
@Shakevg can you please help me out on this... thankyou
I was trying to bypass MFA in one of my CRM application using the secret key, I did everything right the steps ask to, but it seems to be stuck on the OTP screen can you please help me out ....
thankyou @Shakevg i changed it to verification code and it is working fine now. Also, i have this issue while delete a Lead it gives out an error indicating it cannot find the element. Is it xpath issue ? i tried using the xpath inspecting the browser but did not find a match, so i tried my own xpath and still got the same error. Can you plz help me out on this as well .... thankyou [my xpath: //div[@Class='ms-StackItem truncatableText-409']]
Message:
Test method Microsoft.Dynamics365.UIAutomation.Sample.UCI.UpdateLeadUCI.UCITestUpdateActiveLead threw exception:
OpenQA.Selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@tabindex='0' and @ROLE='checkbox']"}
(Session info: MicrosoftEdge=123.0.2420.53)
Stack Trace:
BrowserCommand1.Execute[T1,T2,T3,T4,T5,T6,T7,T8,T9](IWebDriver driver, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6, T7 p7, T8 p8, T9 p9) line 140 BrowserCommand
1.Execute(IWebDriver driver) line 35
BrowserPage.Execute[TResult](BrowserCommandOptions options, Func`2 delegate) line 182
WebClient.OpenRecord(Int32 index, Int32 thinkTime, Boolean checkRecord) line 1535
Grid.OpenRecord(Int32 index) line 32
UpdateLeadUCI.UCITestUpdateActiveLead() line 35
DotaABhash Are you using develop branch?
@Shakevg yes i am using develop branch...
@Shakevg will you please help with this?
I was trying to bypass MFA in one of my CRM application using the secret key, I did everything right the steps ask to, but it seems to be stuck on the OTP screen can you please help me out ....
I get this screen even though I have added my mfasecret key in app.config file.
and my app.config file looks like this
and here is the code for that
public void Login(Uri orgUrl, SecureString username, SecureString password, SecureString mfaSecretKey)
{
var otpKeyStr = "6jm7n6xwitpjooh7ihewyyzeux7aqmw2";
SecureString sec_pass = new SecureString();
Array.ForEach(otpKeyStr.ToArray(), sec_pass.AppendChar);
sec_pass.MakeReadOnly();
var otpKeyBytes = Base32Encoding.ToBytes(otpKeyStr);
var otp = new Totp(otpKeyBytes);
var twoFactorCode = otp.ComputeTotp().ToSecureString(); // <- got 2FA coed at this time!
LoginResult result = _client.Login(orgUrl, username, password, twoFactorCode);
if(result == LoginResult.Failure)
throw new InvalidOperationException("Login Failure, please check your configuration");
_client.InitializeModes();
}
I see there is no link "'I can't use my Microsoft Authenticator app right now' link" on screen.
NikitaShah24 Can you change MFA method from push to code in MS account settings?
What app do you use for MFA? Can you change it to MS authenticator?
Hello @Shakevg I am using microsoft authenticator but in my options there is no code option I can choose. The only options I have is, phone or app authenticator.
I suppose it is not possible to login using EasyRepro on this case