Forum Discussion

vaishnavi_9079's avatar
vaishnavi_9079
Frequent Visitor
1 year ago

We couldn't authenticate with the credentials provided. Please try again - Using right credential

i am trying to get data from postgresql database to powerbi desktop but while entering details of username and password it's appearing as we couldn't authenticate with the credential data. if anyone could help me out it will be a great help

 

12 Replies

  • vaishnavi_9079 

     

    Please check if the credentails that you have are accurate, try to connect to your postgres source from any other tool like dbeaver and see if that works. If not then your credentails are not accurate. 

     

    If you are able to connect from other tools but not from Power BI desktop then, 

    1. Click on transform data drop down

    2. Click on Datasource settings and under global datasources, try to find your postgres source 

    3. Right click on it and click on delete permissions

    4. Try to connect to your source again and enter the credentails correctly. 

     

    Also, I am assuming you have all the necessary prerequisites to establish the connection from Power BI desktop to postgres. Pleaase check out this documentation 

    https://learn.microsoft.com/en-us/power-query/connectors/postgresql

     

    Need a Power BI Consultation? Hire me on Upwork

     

     

     

    Connect on LinkedIn

     

     

     








    Did I answer your question? Mark my post as a solution!
    If I helped you, click on the Thumbs Up to give Kudos.

    Proud to be a Super User!


    • vaishnavi_9079's avatar
      vaishnavi_9079
      Frequent Visitor

      I have done thus procedure several times but after global permission i am not able to get my or any postgres source.

      So it would be real help if you can guide me on how to get your postgres source there or any another solution.

      • tharunkumarRTK's avatar
        tharunkumarRTK
        Super User

        vaishnavi_9079 

        Sources which are used in the current file will appear in the "Data sources in current file" tab and similarly all the sources that you had previously connected since the installation will appear under global permissions tab. 

        There is no other way to manaully add the connection to global permissions tab other than establishing the connection to the source. 

         

        I am not sure whether you tried validating the credentials from any client tool like dbeaver. If not then please do so.

         

        1. Also make sure you are using latest version of power bi desktop which has the NpgSQL bundled with it, if not you need to manully install it. (check the link that I have shared previously

        2. Depending on where the postgres source is hosted, you would need to install necessary certificates in your machine. 

        3. If your source does not support encrypted connection then you need to disable the encryption. 

         

        Please validate all the necessary prerequisites

         

        Need a Power BI Consultation? Hire me on Upwork

         

         

         

        Connect on LinkedIn

         

         

         








        Did I answer your question? Mark my post as a solution!
        If I helped you, click on the Thumbs Up to give Kudos.

        Proud to be a Super User!


  • vaishnavi_9079's avatar
    vaishnavi_9079
    Frequent Visitor

    I have validated my credentials through DBeaver and it is getting connected that means they are correct.

    I have also installed NpgSQL as suggested by you and encryption are also disabled. 

    After all of this now i am getting 

    "An error happened while reading data from the provider:' No connection could be made because the target machine actively refused it'". 

    I am getting this just after entering details of server and database. I am not sure where i am getting wrong.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi vaishnavi_9079,

    Thanks for reaching out to the Microsoft fabric community forum.

     

    It looks like you are facing issue with authentication when trying to get data from PostgreSQL. As tharunkumarRTK already responded to your query, please go through his response and mark it as solution if it solves your issue.

     

    I would also take a moment to thank tharunkumarRTK, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

     

    If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

    Best Regards,
    Hammad.
    Community Support Team

     

    If this post helps then please mark it as a solution, so that other members find it more quickly.

    Thank you.

    • vaishnavi_9079's avatar
      vaishnavi_9079
      Frequent Visitor

      Sir you understood it right that i am getting issue with authentication to get data from postgresql.

      I am really thankful to tharunkumarRTK sir for guiding me.

      I have tried everything that sir has told me but it is not working.

      I am not getting what's the issue which we are not able to catch.

      I'll be really grateful if u can help me out on this.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi vaishnavi_9079,

        Based on your replies so far, it looks like Power BI is unable to establish a connection to the PostgreSQL server, even though your credentials are correct. The error message which you are getting "No connection could be made because the target machine actively refused it" suggests that PostgreSQL is rejecting or blocking the connection. 

        For now can you please check if PostgreSQL is Listening for External Connections. First open the configuration file named "postgresql.conf" which is usually found in PostgreSQL file in C drive. Use this file address : C:\Program Files\PostgreSQL\[Version]\data\. There look for the line listen_addresses='localhost' and if it’s set to 'localhost', change it to listen_addresses='*'. Now save the file and restart the PostgreSQL service.
        And in the same file location as "postgresql.conf" find another file "pg_hba.conf" and make sure there is a rule that allows remote access. Like : host all all 0.0.0.0/0 md5.

        Then save the file and restart PostgreSQL service again. And also check if PostgreSQL is running and listening on Port number 5432. To check open CMD on PostgreSQL server and run "netstat -ano | findstr 5432". If you don’t see any results, PostgreSQL is not listening on the correct port and may need to be restarted.
        If you still encounter the error, please provide ascreenshot of the full error message in Power BI.
         

        If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

        Best Regards,
        Hammad.
        Community Support Team

         

        If this post helps then please mark it as a solution, so that other members find it more quickly.

        Thank you.