Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Custom Data Connector Credential Check Failing - Username/Password generates a token

The REST API I'm querying requires me to login with a username/password and it will return a token, that token then has to be added to the header as x-redlock-auth then the endpoints can be queried.

 

Without the navigator PowerBI desktop won't allow me past the credtials section, with the navigator it's prompting when trying to load my table.

re-prompt.png

 

I've tried adding my own login section:

 

 

Prisma = [
    TestConnection = (dataSourcePath) => { "Prisma.login" },
    Authentication = [ 
        UsernamePassword = [
            UsernameLabel = "Prisma API User",
            PasswordLabel = "Prisma API Password"
            
        ]
    ],
    Label = "Prisma Data Connector"
];

 

 

This logs in or returns null:

 

 

shared Prisma.login = () =>
    let
        loginPayload = [
            username = Extension.CurrentCredential()[Username],
            password = Extension.CurrentCredential()[Password]
        ],

        responseLogin = Web.Contents("https://api3.prismacloud.io", [
            RelativePath = "/login",
            Headers = [#"Content-Type" = "application/json"],
            Content = Json.FromValue(loginPayload),
            ManualCredentials = true
        ]),

        token = Json.Document(responseLogin)[token]
    in 
        token;

 

 

 I also tried spltting out the login path, however the remote API will return an error unless the crecentials are presented in the way above.

 

My alert function, calls web.contents with:

 

 

        response = Web.Contents(url, [ 
            RelativePath = path,
            Headers = [
                #"Content-Type" = "application/json",
                #"x-redlock-auth" = token
            ],
            Content = payLoad,
            ManualCredentials = true
         ]),   

 

 

 

but the url is the same:

 

 

a = GetAllPages("https://api3.prismacloud.io", "/v2/alert", token, Text.ToBinary(alertPayload))

 

 

Any ideas what it's upset about?

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

From the description, there is no problem with the query.

Can log in successfully, but cannot return data?

Could it be an error in the data source path? 

See if these will help:

https://docs.microsoft.com/en-us/power-query/samples/trippin/4-paths/readme 

https://docs.microsoft.com/en-us/power-query/handlingauthentication#data-source-paths 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Any ideas on this one, thanks in advance.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.