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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
john_dawson
Helper I
Helper I

Data Connector Authentication

We are currently taking a number of existing Power BI reports and converting to use the Data Connector

 

Currently, we have worked through a number of examples and implemented non-authenticated connectors OK

 

So far, no success with usaing authenticated data sources; there is some documentation alright e.g. https://github.com/Microsoft/DataConnectors/blob/master/docs/m-extensions.md, which is helpful, but is short on examples

 

We are using the Visual Studio extension to develop the connector; when testing, it asks for the credentials - fine. But having done so, it promptly forgets them and asks for the credentials again ... and again

 

Must be something simple? But this seems to be a fairly new area, so information is bit lacking. Help please!

3 REPLIES 3
v-micsh-msft
Microsoft Employee
Microsoft Employee

Have you checked the following sample?

 MyGraph and Github samples

 

Regards,

Michael

Thanks Michael, but those examples uses OAuth, which is a rather more complicated; we want to start with simple Username / Password; are you aware of any examples that start there?

Follow up, in case this helps others: got the OAUTH Data Connector (DC) per the GitHub link above to work OK, with only a little "fiddling"; the core part is the Authentication element, where the functions that actually implement OAUTH are defined (StartLogin etc.)

 

DataConnectorName = [
    TestConnection = (dataSourcePath) => { "DataConnectorName.Feed" },
    Authentication = [
        OAuth = [
            StartLogin=StartLogin,
            FinishLogin=FinishLogin,
            Refresh=Refresh,
            Logout=Logout
        ]
    ],
    Label = "My Graph Connector"
];

 

We also have another DC which uses anonymous authentication, which is pretty simple, in that respect, per below

 

// Data Source Kind description
DataConnectorName= [
    TestConnection = (dataSourcePath) => {"DataConnectorName.Feed"},
    Authentication = [Implicit = []],
    Label = "DataConnectorName"
];

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.