Connect Azure DB (MFA) in Pycharm - azure

I used to connect Azure DB in pycharm easily. Since MFA is activated I cannot connect my DB into it. Can anyone help me please, I really need to use it from pycharm directly without having to use SQL server management studio each time i want to query the DB. Thank you.
I have tried selecting Azure Active Directory interactive option but it fails.
It appears on some forums that this is a typical pycharm issue where it does not handle MFA authentication but I can't find something recent, all questions asked were in 2017 or 2019.

Related

Azure Data Studio - way to change default connection type for Azure SQL Databases?

I just recently started to use Azure Data Studio to replace SSMS and VS Code. So far it is working great. I do have one "issue" I was wondering if anyone else encounters. I run the application with my Azure AD Admin. Under Connections I see all of my subscriptions and the underlying databases:
When I try to expand a server, I get an error that it is trying to connect with a SQL account:
It then brings up the connection details where it is set to use SQL Authentication:
If I change the Authentication type to Azure Active Directory - Universal with MFA support, and click connect it does without issue.
My question is, is there a way to change what the server connection uses as a default so I don't have to try to expand, fail, change auth type, and then connect? It is nice not having to manually create all of the connections to all of our subscriptions and sql servers and just have them load there and open them.
I searched all the settings of Azure data studio, but did not find the option to change the default authentication type of login Azure SQL.
User and workspace setttings of Azure data studio, you can refrence this document.
You can click the power plug icon in the right and then choose Authentication type to login to the server.

Can I use google cloud speech api in microsoft azure vm?

I am trying to use google cloud speech API in microsoft azure machine(Where I have installed asterisk service). Is it possible to do this. Because in GCP we have an option where we can enable 'Allow all cloud API services'. But in microsoft we do not have an option to enable. If I use I am getting the following error. Please go through the staktrace and help me.
Note : we have a working version in GCP machine. Now I am deploying it into microsoft vm(Then only I am getting this error).
An API can be called over the internet. If the machine is configured to be able to connect to the internet than yes, you can.
Looking at the error you're getting, it looks like there's something wrong with your authentication setup.
DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or explicitly create credentials and re-run the application.
For more information, please see https://cloud.google.com/docs/authentication/getting-started
If you follow the instructions in the linked documentation on Getting Started with Authentication, you should be good to go.
Seams like i answered same less than week ago.
Please check that you setuped credentials for asterisk user, not for root. Asterisk is running under asterisk user.

Azure sign in not working using Azure Tools option in VSCode

I installed the Azure Tools plugin (version: 0.0.4) for VSCode (version: 1.27.2). I have no proxy setting in my system. I validated it by running the command in cmd : netsh winhttp show proxy and found
Direct access (no proxy server).
I tried to login into Azure using the Azure Tools option present in the side bar, which caused a pop up to open at the bottom right corner. I clicked on the button with Copy and Open option which opened a browser instance where I copied the password details, post which when I came back to the VSCode window and then I see that I am still not logged in. I tried the above process multiple times but see the same again and again.
Can anyone help me to get some guidance on this to fix the issue?
I had a similar problem and for me was the latest Azure Account plugin version 0.9.10. It doesn't work.
I reinstalled the previous version 0.9.9 and now the login works again.
I can't reproduce it with Azure Account extension (0.4.3) for VSCode (version: 1.27.2).
If azure cli is installed, please have a try to use az login to check whether it can login. If you can login with az command then close the VS code and open it to try again.
I had a similar problem.
I am a member of several tenants for various orgs.
By updating my tenant Id in the Azure Account extension settings I was able to sign in.
I suspect I will have to update it when I want to work in a subscription owned by another tenant.
I ran into a similar issue when trying to login and extract an API from API management. Using Azure Sign In or Azure Login would open up the popup but the callback URL would not trigger a sign in VS Code. I tried everything to the point of reinstalling VS Code.
After messing around with the different Azure Sign In options, I finally got an error when trying to sign in to Azure Cloud. The error mentioned that my admin requires the use of a device code. Unfortunately this error is neither shown nor handled when using the default Azure Sign In command.
The fix for me was to expressly sign in using Azure Sign In with Device Code.
I can reproduce, It does not work on Ubuntu,
no matter what I do.
I gave up, and moved to windows.
So 1:0 for Microsoft :-)
If something does not work with Azure:
try with windows
try with Edge
Its painful truth - they only support software they already own. Which make sense business-wise.

Azure Tools for VS - can't sign in to subscription

I'm having a pretty strange issue with Azure tools for VS 2013 (version 2.6). Whenever I try to sign in to my Azure subscription (e.g. from Server explorer or creating a new web role project) I get the following error:
Server Explorer
An error occurred during the sign in process: User 'foo#gmail.com' returned by service does not match user 'bar#outlook.com' in the request
OK
My subscription owned by 'bar#outlook.com' and I can perfectly fine sign in either to management portal in a browser (IE, Spartan and Chrome) - as well as in the Power Shell. Tried everything - cleaning up browser caches/cookies, resetting IE settings, playing with different IE security settings - nothign works.
Any help is appreciated - this issue drives me crazy.
P.S. I'm on Windows 10...
I had the same problem. Imported the certificate manually and everything worked ok: https://social.technet.microsoft.com/Forums/en-US/9cdafeb4-f459-436d-b2b8-9bc5c01f0df1/azure-tools-for-vs-cant-sign-in-to-subscription?forum=windowsazuredevelopment
I had this issue, to resolve it I:
Added 'foo#gmail.com' as an alias in my 'bar#outlook.com' Microsoft account, via account.live.com
Made the 'foo#gmail.com' email address the primary alias for my Microsoft account
I could then log in successfully in to Azure by pressing the Connect to Microsoft Azure button in the toolbar of the Server Explorer in Visual Studio 2013 and see all of my websites under the App Service node.
(When I'd used the certificate method described in the other post and Microsoft documentation I'd been able to see all my sql databases etc. but not the websites.)
Once I'd done all that I then switched my primary alias back to 'bar#outlook.com' and server explorer carried on working.
NB: If you're experimenting with this beware that there is a limit on how many times you can switch your primary.. as I have just discovered.. and now my primary is stuck on the wrong email address for a week.
NB2: If your connecting in order to be able to remote debug the website, then this can still be done by going to Visual Studio>Main Menu>Debug>Attach To Process, and then enter the URL of the site (without the http bit, e.g. mysite.azurewebsites.net) as the Qualifier and then attach to the w3wp.exe process.
I am having the exact same issue. It seems that the Azure sign-in in Visual Studio is redirecting to our organizational Single Sign-On instead of the Microsoft one. I have managed to work around this problem by using a Microsoft account that is not tied to my organization:
Create new Microsoft account or use an existing account not associated with your organization
In https://manage.windowsazure.com select Subscriptions/Manage Administrators
Choose Add+ and add the new Microsoft account as administrator to your subscription
Log on to Azure using the new account from Visual Studio
/Morten
I changed my Microsoft account's email address and had this problem. Adding an alias did not help.
The problem is to do with the Azure Active Directory Library for DotNet. For whatever dumb reason, they throw an exception when Azure returns an ID different than the one requested (if the server isn't crying about it, why make up an error and make the client deal with it?).
Since Azures's support was no help, I had to build a custom copy of the ADAL with that moronic exception removed and an assembly version matching the one used in VS2013 (2.11). Also importantly, disable strong name verification for the custom assembly.

Unable to display SQL Azure table definition in Visual Studio 2013

The error I am getting is:
Problem loading: The designer encountered an error while loading the table definition
I can view the data within the tables inside VS just fine and can even query the data too. This is a fresh install on my computer.
What I have tried:
Tried viewing the table in both "Server Explorer" and "SQL Server
Object Explorer."
Checked if my login credentials has permissions to
create tables in the "Management Portal."
Installed SSMS and still cannot show the design of the table
Tried connecting to the database using OLE DB and SQL Server data providers, but I still get the same issue
Added my IP connection to the server firewall and turned on "Windows Azure Services"
Set the connection timout counter to zero
This is the image of my error. I generated a very simple user table just for testing purposes from the Management Portal.
This is a simple test to connect to the Azure database without using a project template. This is my first time using SQL Azure just to warn you. Sure I can just stick to using the Management Portal to change the table definition and stuff like that, but I was wanting to keep everything in one program.
I have found this issue only applies when using the new "Basic/Standard" tier of databases in Azure. If you switch back to the older style "Web/Business" tiers it will start working again.
I found this on a Microsoft forum after struggling for hours. It still takes an age to load, but with the preview SSDT tools, I did get a visual editor for the first time.
Posted by Microsoft on 1/7/2015 at 1:59 PM:
This bug has been fixed in the Preview release to support Azure SQL Database Update V12
See http://blogs.msdn.com/b/ssdt/archive/2014/12/18/sql-server-database-tooling-preview-release-for-the-latest-azure-sql-database-update-v12-preview.aspx for details of this.
The fix will also be included in our next full (non-Preview) release.
Thanks,
Kevin Cunnane,
SQL Server database tooling team

Resources