Forum Discussion
Store access token custom connector
Hi Anonymous
Do you connect to data with Power BI Desktop via custom connector?
Or do you embed the Power BI Content into your apps?
If you are in first scenario,
when you connect to data, you need to provide the specific credential to retrieve data from the data source.
Does the flow you write above fit for you(report creator) or any users who consume your report?
If you are in the second scenario, please read official documents.
Step 2: Get n authentication access token
Best Regards
Maggie
I connect to data with custom connector.
In the definition of connector, I specified UsernamePassword as my method of authentication. The OAuth flow provided by PowerBI does not fit with my flow, for that reason I defined UsernamePassword as authentication.
So, is possible to store that access_token with UsernamePassword authentication?
- tonmcg7 years agoResolver II
No. If you've defined the authentication kind as UsernamePassword, then the only fields available to the Extension.CurrentCredential() record are UserName and Password. The access_token field is only available to the record if the authentication kind is OAuth.
What kind of OAuth grant type does your API require? Custom connectors should be able to handle the Authorization Code, Implicit, and Client Credentials grant types. Does your API use another grant type?
- Anonymous7 years agoNot applicable
Client credentials, but I don't want that PowerBI redirect to a another page to sign in.
is there an example for that kind of grant type?
Thanks
- tonmcg7 years agoResolver II
I've never done that nor have I seen it implemented. If you search for the terms client_credentials and grant_type on GitHub, you get two hits: one is from my repo where I authenticate to Twitter (not a custom connector) and the other is a repo for a custom connector that authenticates to Microsoft Teams. I don't know if that works, but I would try adapting that for my purposes.
Good luck!