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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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