dataverse-gen icon indicating copy to clipboard operation
dataverse-gen copied to clipboard

Client ID and Secret auth

Open scottdurow opened this issue 3 years ago • 3 comments

For non-interactive scenarios (or convenience) allow auth using a client id and secret - similar to the Power Platform CLI. This would by-pass the dataverse-auth profile, and use the secret as-is without any persisted token.

scottdurow avatar Jun 14 '22 03:06 scottdurow

Hey Scott, I was curious if you were ever able to get around to this? I wanted to try and play around with dataversify for our projects, except unfortunately our organization only enables us to authenticate through the Client Secret.

Thanks :)

killerrin avatar Mar 15 '23 16:03 killerrin

Hi @killerrin - I got as far as implementing authorizeWithSecret (https://github.com/scottdurow/dataverse-ify/blob/a1ee701fecd113bb80b806bea9eb74f55936ab4e/src/webapi/node/NodeWebApi.ts#L17)

Now need to add parameters to dataverse-gen to allow authorizing using them.

scottdurow avatar Mar 15 '23 18:03 scottdurow

This is now added to [email protected]

Usage: npx dataverse-get [command] [-u] [-t] [-a] [-cs]
  dataverse-gen : Generates from an existing .dataverse-gen.json file
  dataverse-gen init  : Adds .dataverse-gen.json config file to your project
  dataverse-gen eject : Adds the templates to your project to allow you to customize them!
  -u:  Optional: The url of the environment to connect to e.g. 'https://myorg.crm.dynamics.com'.
       If not provided, the environment is selected from the list created using dataverse-auth
  -t:  Optional: The Tenant Id if using an application user to connect.
  -a:  Optional: The Application Id if using an application user to connect.
  -s:  Optional: The Client Secret if using an application user to connect.

scottdurow avatar Mar 17 '23 00:03 scottdurow