Connect-AzAccount change browser - windows

When I run Connect-AzAccount my default browser set on windows OS(Chrome) is not running. But instead it is loading IE and asking for login details. How to change the browser ?

At my company, we use MFA for our Azure AD account. Additionally, our local AD is not integrated with Azure AD. And to make it more challenging, we use our local AD account (first.last#company.com) to authenticate to Azure DevOps while we use our Azure AD account (first.last#admin.company.com) to authenticate to the Azure Resource Manager API.
Every time that I tried to authenticate with my Azure AD account (first.last#admin.company.com) in PowerShell with Connect-AzAccount, it would authenticate as with my local AD account (first.last#company.com), instead.
I tried the usual commands to no avail:
Disconnect-AzAccount
Clear-AzContext -Scope CurrentUser -Force
Disable-AzContextAutosave -Scope Process
I tried nuking the history in Internet Explorer, but no dice.
I changed the default browser on my laptop from Chrome to Edge, and I nuked the history in Edge. No impact. PowerShell seemed to still be using its same engine for managing the interactive Azure login page regardless of what the OS is using for the default browser.
I researched how to change the browser used by PowerShell to manage the interactive Azure login page (Connect-AzAccount) to work around the problem. But I didn't have any luck finding a solution.
Here's what ultimately worked in my scenario:
Disconnect-AzAccount
Connect-AzAccount -UseDeviceAuthentication
When you use the -UseDeviceAuthentication option, Connect-AzAccount lets you manually pick which browser you want to use for Azure authentication.
In my case, I used Chrome in incognito mode to perform Azure authentication, and I was finally able to authenticate with my Azure AD account ("first.last#admin.company.com") successfully.
Although this doesn't change the default browser used by Connect-AzAccount, it's a work-around to let you manually choose a different browser for Azure authentication.

The pop-up window is not the default browser, only az login is used to log in through the browser.
In az login, if you want to log in in any browser, log in through az login --use-device-code.
In Connect-AzAccount, the page opened by default is still the powershell tool, it is not a browser, the following gif can be clearly seen in the task manager.
Step 1. Run Connect-AzAccount in powershell.
Step 2. Check Task Manager.
Suggestion
You can login azure without browser by
Connect-AzAccount -Credential $Credential -Tenant $tenant -Subscription $subscription
For more details, you can refer to the post.
Connect-AzAccount - how to avoid azure device authentication?

Related

Azure AD with NTLM/Windows Integrated Authentication

I'm looking for a way to auto-login a user that's logged in with an Azure AD user account into a web application.
What I've got so far: A web application that uses an Azure OAUTH workflow to login to the application. The user is forwarded to Azure's login page and after a successful login, he will be redirected to the web application with an oauth code that later used to get the user's identity.
Now I've got a new situation: Windows PC are part of a Azure Active Directory and the users all use AD users. Is it possible to use NTLM/Windows Integrated Authentication to auto-login when they open the page.
I looked for a way to enable NTLM/WIA for the OATUH flow to avoid that a user has to re-enter the credentials that he just used to unlock his pc.
Is there a way to do this?

Azure Portal Login automatically uses Windows Account

In Internet Explorer, when I go to any site that is authenticated via Azure AD, the login page automatically chooses to log me in with my Windows Account. This functionality would typically be great, but I need to use different credentials (my clients).
How can tell IE to NOT automatically log me into Azure AD with my windows credentials?
When I use any different browser, the expected functionality exists and I am prompted to enter the login credentials I want. Also, the solution can not be "just use a different browser". Client uses IE for everything and won't allow users to install different browsers.
I am running Windows 10.
Thanks in advance
Opening IE InPrivate window should allow you to login with any user you need.
Use Ctrl+Shift+P or Settings Icon->Safety->InPrivate Browsing.

IIS 7.5 onwards - Windows login via a web page

Is it possible to auto login to IIS using an AD username and password when on the intranet (for example, someone has logged into the AD when logging on to their desktop) AND for them to access the same site when not on the intranet using a login page? Because IIS has to disable anonymous access in order for Windows authentication to work it is not possible to have a login page for users 'off site'?
If you are using Windows Authentication and you have anonymous access disabled as you say, then AD users should be able to access the site without being prompted to log in, and remote users who have not authenticated with AD will get a Windows dialog box that pops up in the browser and prompts the user to enter their AD credentials.

How to log off in the dynamic crm

I log in the dynamic CRM and I want to use a another account to log in again. How to log off the CRM system?? I have cleaned the cookies and it doesn't work.How to do it?
If you are using CRM Online, you can use the "Sign Out" link in upper right hand corner of the page.
If you are running On Premise you will have to take a few extra steps as CRM is looking for your Active Directory credentials. An easy way would be to change the security settings in Internet Explorer so that you are prompted to enter credentials.
Security Settings -> Local Intranet -> Custom Level - Uncheck Automatic login with current username and password
http://support.microsoft.com/kb/892666
For those using Safari for OSX login to Dynamics CRM on Premise, if you didn't use Keychain to store password for this site, you will clear the connection when you turn off Safari.
But if you use Keychain to store, you need to use Keychain Access and manually remove password related to Dynamics CRM. Then turn off your browser. You authentication cookie will be killed. When you reopen Safari and browse Dynamics CRM, if will prompt and ask for password again.
Log Off Microsoft Dynamics CRM on Premise from Safari on OSX

Windows Authentication C# MVC3

Is it possible to have automatic user authentication from Active Directory when open Internet Explorer without user enter username/password.
As right now. I have windows authentication, where users after open internet explorer, they have to enter he/she username and password from AD. So since the application has the same credential that the PC. I was wondering, how could i do so user don't have to log in when open internet explorer to use the web application.
I am thinking something like single sign on type of deal.
If your users already log in with their AD credentials your problem is almost resolved.
Your users have to add the site to the local intranet zone (so they aren't prompted for credentials) in their Interner Explorer Configuration. Also check in internet explorer security zone settigns that the following is enabled:
User Authentication -> Set Automating Logon Only In Intranet Zone

Resources