Powershell connect-microsoftteams mfa via userform generates unhandled exception - userform

Powershell connect-microsoftteams mfa via userform generates unhandled exception
Hi, I'm trying to create a gui frontend to a number of scripts to make them easier to access and use for colleagues . Some of the scripts require connections to O365 admins like connect-microsoftteams. At first the MFAs for the connects wouldn't even appear. Uncle google advised to use Powershell 7 when connecting through userforms. Which we installed and that did make the MFAs appear. However, when authenticating the MFA, I get a unhandled exception (an issue with the parameter 'session') and MFA browser window says 'Can't reach this page'. And the url of the MFA browser window is calling an odd localhost:..... url. clicking Continue on the unhandled exception does nothing
Outside of the gui, the connections work fine.
I've tried:
try-catch block, no change
&
netsh winhttp reset proxy, no change
thumbnail image 1 of blog post titled
Powershell connect-microsoftteams mfa via userform generates unhandled exception
Any ideas how I can get passed this?

I think I found the answer.
Simply switch the default browser to MS Edge

Related

ASP.NET Core Auth0 - Unable to unprotect the message.State

We have Auth0 enabled for a site and it has been working well for quite some time.
All of a sudden when I enter the site and get redirected to Auth0 to enter my crendentials (and press login), I get faced with a screen with the following message.
An unhandled exception occurred while processing the request.
Exception: Unable to unprotect the message.State.
MoveNext AggregateException: Unhandled remote failure.
MoveNext
If I repeatedly refresh my site with /signin-auth0 at the end of the url the same error screen is shown.
Now when I repeated all steps from start (meaning entering my site) it all of a sudden work. What's this error anyway?
This was resolved by the Auth0 team as a bug in Auth0's transmission of the state parameter for social logins, notably Google. Things should be working normally again.

Issue with Podio's ASP.NET sample application authoring

Whenever I run the Podio ASP.NET Sample Application, it displays me the 'Authentication' page asking for either my Podio credentials or to choose the "Server side flow" with "Sign in to Podio"-button. However, once I try to authenticate with either method, Visual Studio prompts me with a "SqlException was unhandled by user code - An exception of type 'System.Data.SqlClient.SqlException' occurred in NPoco.dll but was not handled in user code" warning (image), referring to line 20 on PodioOAuthData.cs. I've followed the instructions on the GitHub readme page but I can't get it to work. Any idea if I'm missing something?
It seems the readme is a little light on details when it comes to an out-of-the-box experience.
You actually need a running SQL server somewhere. And then edit PodioAspNetSample/Web.config (https://github.com/podio/asp-net-sample/blob/master/PodioAspNetSample/Web.config#L22) to contain the right connection string.
Good luck.

JMeter - Trouble signing into a simple authentication website while recording

I have been trying to resolve this for some time now. I tried googling for this problem but didn't manage to find anything. All the questions I found were about replaying already recorded HTTPS requests.
So, I need to record HTTPS requests on a site protected with simple authentication (the pop-up window asking for username and password).
And this is where I get stuck. I enter correct login details and confirm it, nothing happens and in a second i get prompted to enter login details again, no error message nothing. When I press ESC I get 401 UNAUTHORIZED error.
Basically the site is acting as if the login details were incorrect when in fact I tried the same login details without Jmeter's proxy and the server accepted it.
What I tried:
1) Logging into this site without JMeter's proxy - works without problem
2) Recording different HTTPS site with JMeter's proxy - I tried my email and that works correctly as well
I should also mention that I am behind a company proxy, but I tried it at home and the result was same.
As for JMeter configuration, I am using everything on default having:
Thread Group
HTTP Cache Manager
HTTP Cookie Manager
HTTP Request Defaults
Recording Controller
HTTP(S) Test Script Recorder
Guessing the Thread Group doesn't really matter since I don't run any tests, only recording.
Additional Details:
Server:IIS
Logging into sharepoint website
EDIT:
Forgot to mention I tried already Blazemeter Extension, but when i try to record the logging session, it just freezes. Website hangs on trying to contact Blazemeter Cloud and Blazemeter plugin freezes, making it imposssible to stop recording and having to restart whole browser.
Also just noticed that when I am already logged in and try to access the site it records it without any issue. So it's only the login which is problematic for some reason.
JMeter removes cookies and authorization headers while recording.
You can use JMeter Chrome Extension as an alternate way of recording your test scenario.
In order to properly replay the recorded script you'll need to add HTTP Authorization Manager to it .
Sharepoint can have different authentication types, i.e.
Basic HTTP Authentication
Windows Integrated Authentication (NTLM)
Kerberos
See Windows Authentication with Apache JMeter guide to learn how to bypass each authentication challenge in your JMeter test.
So I was able to finally resolve this. The issue lied in sharepoint authentication. I was logged in a domain with my personal account, but was trying to access the sharepoint using a different account.
Sharepoint ignored the login details I was prompted to enter and used mw domain credentials instead. So the answer for me was to access the sharepoint website while being logged into domain(windows) with the same account.

recaptcha plugin for .net shows error on postback

I am trying to set up a captcha in MVC; I am following the steps in this article to the letter. While testing I found that the application gets an "Unable to connect to remote server" error. Clicking submit on a form with the captcha field empty works fine, it goes through the controller method with no problems. It's only when there's stuff typed on the captcha field that an error comes up regardless of if the verification is not correct. Also, VS 2013 says that a class from the Recaptcha library - RecaptchaControlMvc.cs -is not found.

Issues with Worklight authentication

I'm trying to develop a custom login form using Worklight customSecurityTest, based on SingleStepAuthAdapter application sample.
Basically, I've noticed that the login function used in the SingleStepAuthAdapater is always called after that user try to access to a secured function (after that, on login action, secured data are sent to the user), but if i try to call the submitAuthentication function directly, before any attempt to access to a secured function (i have inverted the "login page" with the "get secured data" page), i got the following error/lo on firebug:
The two POST calls are the same function raised two times by Worklight on login action (submitAuthentication function inside the SingleStepAuthAdapter called by singleStepAuthRealmChallengeHandler.submitAdapterAuthentication(invocationData, {})) and the error is related to the fact that authentication is requested twice: probably when the authentication request is performed, this function is issued twice after that the submitSuccess() function is called inside the handleChallenge (in fact, the issue doesn't occurs when i delete the submitSuccess invokation, but WL framework is not notified and, for example the isUserAuthenticated function return false, until the access to a secured resource is performed).
How can fix this behavior? What are the best practices to develop a simple login-form using worklight that allow authentication before any access to a proteced resource? I have found some workarounds (such as perform a fake data request before perform the submitAuthentication, but i hope that you can suggest me a better solution).
I've consulted the infocenter and the getting started modules, but probably due to my fault I'm not able to found any useful information
A common practice is to have an initial blank page or view for your app.
In WLCommonInit, either access a protected resource (that is what getsecretdata is all about), or call WL.Client.login(). Another option (suggested by #tk27) is to secure the app in the application descriptor and set connect on login to true. This will trigger authentication when the app starts.
Your challenge handler should display a login prompt dialog, and when the authentication successfully completes, transition to the first real page of your app.
This way, authentication is still done in response to a challenge from the WL Server (as it must be) but you don't see anything but a blank page to a login prompt until the login is successful.