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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
mabr
Regular Visitor

Custom Connector display an individual datasource name

Hello,

 

I´ve built a custom connector where I have to enter a URL and later username/password credentials:

 

[DataSource.Kind="customCo.Auth", Publish="customCo.Publish"]
shared customCo =
    Value.ReplaceType(customCoImpl, customCoType);

customCoType = type function (
    url as (type text meta [
        DataSource.Path = false,
        Documentation.FieldCaption = "customCo URL",
        Documentation.FieldDescription = "some text",
        Documentation.SampleValues = {"https://host.domain.com"}
    ])
) as any;

customCoImpl = (url as text) =>
    let
        result = customCoNavTable(url)
    in
        result;

customCo.Auth = [
    Label = "customCo",
    Authentication = [
        UsernamePassword = [
            UsernameLabel = "Username",
            PasswordLabel = "Password",
            Label = "customCo"
        ]
    ]
];

 

As you can see, I´ve already tried to set DataSource.Path = false without any success:

 

mabr_0-1773044193955.png

 

Still the URL as the root element and datasource Name. I want it to fall back on a fixed string (which it does when I configure the custom Connector without parameters). It should look like this:

 

mabr_1-1773044954879.png

 

How can I achieve this?

1 ACCEPTED SOLUTION
v-pnaroju-msft
Community Support
Community Support

Thankyou, @Juan-Power-bi for your response.

Hi mabr,

Based on our understanding, the behavior you are observing may be attributed to how Power Query determines the data source identity for custom connectors. Although you have correctly set DataSource.Path = false, this metadata only affects credential scoping and does not govern what appears as the Navigator root label. When a connector accepts a dynamic parameter such as a URL and uses it to establish the connection, Power Query may still infer the data source path from that endpoint. Consequently, the Navigator displays http://localhost:55561 as the root node.

If a fixed root label such as customCo is required, the connector would need to expose a parameter less entry function and handle the URL internally, rather than using it in the data source function signature.

If the capability to override the Navigator root label while continuing to use a dynamic URL parameter would be useful for your scenario, we kindly request you to raise an idea in the Ideas Forum using the following link: 
Fabric Ideas - Microsoft Fabric Community

Additionally, please refer to the following links:
Handling Data Access - Power Query | Microsoft Learn
Handling authentication for Power Query connectors - Power Query | Microsoft Learn

We hope the information provided helps to resolve the issue. Should you have any further queries, please feel free to contact the Microsoft Fabric community.

Thank you.

View solution in original post

6 REPLIES 6
v-pnaroju-msft
Community Support
Community Support

Hi mabr,

We are glad to know that your issue has been resolved. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.

Thank you.

v-pnaroju-msft
Community Support
Community Support

Hi mabr,

We would like to follow up and see whether the details we shared have resolved your problem. If you need any more assistance, please feel free to connect with the Microsoft Fabric community.

Thank you.

Hi,

 

the details you provided more or less solved my problem. I understood that this is the expected behavior. Thanks for your clarification.

 

Br,

v-pnaroju-msft
Community Support
Community Support

Thankyou, @Juan-Power-bi for your response.

Hi mabr,

Based on our understanding, the behavior you are observing may be attributed to how Power Query determines the data source identity for custom connectors. Although you have correctly set DataSource.Path = false, this metadata only affects credential scoping and does not govern what appears as the Navigator root label. When a connector accepts a dynamic parameter such as a URL and uses it to establish the connection, Power Query may still infer the data source path from that endpoint. Consequently, the Navigator displays http://localhost:55561 as the root node.

If a fixed root label such as customCo is required, the connector would need to expose a parameter less entry function and handle the URL internally, rather than using it in the data source function signature.

If the capability to override the Navigator root label while continuing to use a dynamic URL parameter would be useful for your scenario, we kindly request you to raise an idea in the Ideas Forum using the following link: 
Fabric Ideas - Microsoft Fabric Community

Additionally, please refer to the following links:
Handling Data Access - Power Query | Microsoft Learn
Handling authentication for Power Query connectors - Power Query | Microsoft Learn

We hope the information provided helps to resolve the issue. Should you have any further queries, please feel free to contact the Microsoft Fabric community.

Thank you.

Juan-Power-bi
Memorable Member
Memorable Member

The issue is how Power BI determines the datasource path. DataSource.Path = false on a function parameter only hides that parameter from the credential path — but since url is your only parameter, Power BI still needs something to identify the datasource kind, and it falls back to showing the URL.
The fix is to move the URL out of the function signature and into the credential itself by using a datasource function with no path parameters. The trick is declaring the DataSource.Kind with no parameters at all, and accepting the URL inside the function body instead:
m[DataSource.Kind="customCo.Auth", Publish="customCo.Publish"]
shared customCo = Value.ReplaceType(customCoImpl, customCoType);

customCoType = type function (
url as (type text meta [
Documentation.FieldCaption = "customCo URL",
Documentation.FieldDescription = "some text",
Documentation.SampleValues = {"https://host.domain.com"}
])
) as any;

customCoImpl = (url as text) =>
let
result = customCoNavTable(url)
in
result;

customCo.Auth = [
Label = "customCo",
Authentication = [
UsernamePassword = [
UsernameLabel = "Username",
PasswordLabel = "Password",
Label = "customCo"
]
],
// This is the key part — empty datasource path
TestConnection = (dataSourcePath) => {"customCo"}
];
The real key is making sure none of your function parameters contribute to the datasource path. You do that by marking ALL parameters with DataSource.Path = false:
mcustomCoType = type function (
url as (type text meta [
DataSource.Path = false, // <-- must be here
Documentation.FieldCaption = "customCo URL"
])
) as any;
When every parameter has DataSource.Path = false, the credential key becomes just the connector kind name (customCo.Auth) with no path component — which is exactly what gives you the clean fixed label. If the URL is still showing up despite that, double-check you're not accidentally inheriting a path from a nested Web.Contents or similar call that has its own datasource registration.

Hi Juan,

 

thanks for your answer, but no matter what I try it doesn´t work. I have cut down my code to a minimal version:

 

section customCo;


[DataSource.Kind="customCo.Auth", Publish="customCo.Publish"]
shared customCo = Value.ReplaceType(customCoImpl, customCoType);


customCoType = type function (
    url as (type text meta [
        DataSource.Path = false,
        Documentation.FieldCaption = "customCo URL",
        Documentation.FieldDescription = "some text",
        Documentation.SampleValues = {"https://host.domain.com"}
    ])
) as any;


customCoImpl = (url as text) =>
    let
        result = customCoNavTable(url)
    in
        result;


customCo.Auth = [
    Label = "customCo",
    Authentication = [
        UsernamePassword = [
            UsernameLabel = "Username",
            PasswordLabel = "Password",
            Label = "customCo"
        ]
    ],
    TestConnection = (dataSourcePath) => {"customCo"}
];


customCo.Publish = [
    Category = "Database",
    ButtonText = { "customCo", "customCo" }
];


Table.ToNavigationTable = (
    table as table,
    keyColumns as list,
    nameColumn as text,
    dataColumn as text,
    itemKindColumn as text,
    itemNameColumn as text,
    isLeafColumn as text
) as table =>
    let
        tableType = Value.Type(table),
        newTableType = Type.AddTableKey(tableType, keyColumns, true) meta 
        [
            NavigationTable.NameColumn = nameColumn, 
            NavigationTable.DataColumn = dataColumn,
            NavigationTable.ItemKindColumn = itemKindColumn, 
            Preview.DelayColumn = itemNameColumn, 
            NavigationTable.IsLeafColumn = isLeafColumn
        ],
        navigationTable = Value.ReplaceType(table, newTableType)
    in
        navigationTable;


customCoNavTable = (baseUrl as text) as table =>
    let
        FallbackTable = Table.FromRows({}, {}),

        ToNavItems = (list) =>
            let
                result = List.Transform(list, each
                    [
                        Key = _[key], 
                        Name = _[name],
                        ItemKind = _[type],
                        ItemName = _[name],
                        IsLeaf = true,
                        Data = FallbackTable
                    ]
                )
            in
                result,

        values = {
            [key="item1", name="item1name", type="Folder"],
            [key="item2", name="item2name", type="File"]
        },

        rootTable = Table.FromRecords(ToNavItems(values)),

        nav = Table.ToNavigationTable(
            rootTable,
            {"Key"},
            "Name",
            "Data",
            "ItemKind",
            "ItemName",
            "IsLeaf"
        )
    in
        nav;

 

Why does it still show the URL in the Navigator?

 

mabr_0-1773069805170.png

 

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.