Open scottdurow opened 2 years ago
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 :)
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.
This is now added to dataverse-gen@2.0.15
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.
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.