<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Custom Data Connector Credential Check Failing - Username/Password generates a token in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Credential-Check-Failing-Username-Password/m-p/2339567#M34410</link>
    <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="re-prompt.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/670127i07FA1B2868CF2D56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="re-prompt.png" alt="re-prompt.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried adding my own login section:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Prisma = [
    TestConnection = (dataSourcePath) =&amp;gt; { "Prisma.login" },
    Authentication = [ 
        UsernamePassword = [
            UsernameLabel = "Prisma API User",
            PasswordLabel = "Prisma API Password"
            
        ]
    ],
    Label = "Prisma Data Connector"
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This logs in or returns null:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;shared Prisma.login = () =&amp;gt;
    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;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My alert function, calls web.contents with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        response = Web.Contents(url, [ 
            RelativePath = path,
            Headers = [
                #"Content-Type" = "application/json",
                #"x-redlock-auth" = token
            ],
            Content = payLoad,
            ManualCredentials = true
         ]),   &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the url is the same:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;a = GetAllPages("https://api3.prismacloud.io", "/v2/alert", token, Text.ToBinary(alertPayload))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas what it's upset about?&lt;/P&gt;</description>
    <pubDate>Thu, 17 Feb 2022 10:01:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-02-17T10:01:09Z</dc:date>
    <item>
      <title>Custom Data Connector Credential Check Failing - Username/Password generates a token</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Credential-Check-Failing-Username-Password/m-p/2339567#M34410</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="re-prompt.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/670127i07FA1B2868CF2D56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="re-prompt.png" alt="re-prompt.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried adding my own login section:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Prisma = [
    TestConnection = (dataSourcePath) =&amp;gt; { "Prisma.login" },
    Authentication = [ 
        UsernamePassword = [
            UsernameLabel = "Prisma API User",
            PasswordLabel = "Prisma API Password"
            
        ]
    ],
    Label = "Prisma Data Connector"
];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This logs in or returns null:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;shared Prisma.login = () =&amp;gt;
    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;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My alert function, calls web.contents with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        response = Web.Contents(url, [ 
            RelativePath = path,
            Headers = [
                #"Content-Type" = "application/json",
                #"x-redlock-auth" = token
            ],
            Content = payLoad,
            ManualCredentials = true
         ]),   &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the url is the same:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;a = GetAllPages("https://api3.prismacloud.io", "/v2/alert", token, Text.ToBinary(alertPayload))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas what it's upset about?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 10:01:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Credential-Check-Failing-Username-Password/m-p/2339567#M34410</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-17T10:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Data Connector Credential Check Failing - Username/Password generates a token</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Credential-Check-Failing-Username-Password/m-p/2344476#M34454</link>
      <description>&lt;P&gt;Any ideas on this one, thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 10:02:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Credential-Check-Failing-Username-Password/m-p/2344476#M34454</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-17T10:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Data Connector Credential Check Failing - Username/Password generates a token</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Credential-Check-Failing-Username-Password/m-p/2346378#M34472</link>
      <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the description, there is no problem with the query.&lt;/P&gt;
&lt;P&gt;Can log in successfully, but cannot return data?&lt;/P&gt;
&lt;P&gt;Could it be an error in the data source path?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if these will help:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-query/samples/trippin/4-paths/readme" target="_self"&gt;https://docs.microsoft.com/en-us/power-query/samples/trippin/4-paths/readme&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-query/handlingauthentication#data-source-paths" target="_self"&gt;https://docs.microsoft.com/en-us/power-query/handlingauthentication#data-source-paths&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Liang&lt;BR /&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 02:54:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Data-Connector-Credential-Check-Failing-Username-Password/m-p/2346378#M34472</guid>
      <dc:creator>V-lianl-msft</dc:creator>
      <dc:date>2022-02-18T02:54:21Z</dc:date>
    </item>
  </channel>
</rss>

