Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Call API using Basic Auth + 2FA

Good afternoon all, looking to verfiy I've not done something wrong.

I'm trying to access the Pulseway RMM API that the documentation states: "uses Basic Authentication which requires an authorization header with the username and password in the username:password format encoded as Base64."


I've done this but I'm getting a "we couldn't authenticate with the credentials provided. Please try again." error message.


When I log in to Pulseway RMM web portal, my organisation requires 2FA in the form of using the Microsoft Authenticator app to generate a one-time 6-digit code - Am I right in thinking this is why I'm getting the failure to authenticate.


After looking around this forum, and the net as a whole, I found a post on this forum by @luiTre that said:


So I've tried updating my Base64 encoded credentials to be username:passcode:password but this doesn't work either. I've tried it using an external encoder like, and I've tried handling the encoding directly in Power Query.


Does anyone have any experience of calling an API that requires Basic Auth + 2FA?


My code:




    URL             =   "",
    Path            =   "v2/systems",
    Username        =   "username",
    OneTimePasscode =   "123456",
    Password        =   "password",
        Credentials     =   Username & ":" & Passcode & ":" & Password,

            Binary = Text.ToBinary(Credentials),
            Base64 = Binary.ToText(Binary, BinaryEncoding.Base64),

    Source = Json.Document(Web.Contents(URL,
            [ RelativePath = Path, 
              Headers = [ Authorization = "Basic " & Base64 ]]))




Community Support
Community Support

Hi  @jwillis07 ,


You need to ask admin to first enable multi-factor authentication for you ,check the reference below:

For basic auth,check below thread:





Best Regards,

Did I answer your question? Mark my post as a solution!



Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors