Forum Discussion
Store access token custom connector
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?
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!