{"id":20598576,"url":"https://github.com/scottdurow/dataverse-auth","last_synced_at":"2025-04-15T00:23:38.432Z","repository":{"id":37193151,"uuid":"255977396","full_name":"scottdurow/dataverse-auth","owner":"scottdurow","description":"Performs on-behalf-of auth against a Microsoft Dataverse environment using pure NodeJS.","archived":false,"fork":false,"pushed_at":"2024-12-04T23:47:31.000Z","size":618,"stargazers_count":13,"open_issues_count":3,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T12:21:10.412Z","etag":null,"topics":["dataverse","microsoft-dataverse"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scottdurow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-15T16:37:33.000Z","updated_at":"2025-03-17T20:27:11.000Z","dependencies_parsed_at":"2024-11-16T14:03:28.477Z","dependency_job_id":null,"html_url":"https://github.com/scottdurow/dataverse-auth","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottdurow%2Fdataverse-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottdurow%2Fdataverse-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottdurow%2Fdataverse-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottdurow%2Fdataverse-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scottdurow","download_url":"https://codeload.github.com/scottdurow/dataverse-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248982130,"owners_count":21193346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dataverse","microsoft-dataverse"],"created_at":"2024-11-16T08:27:24.456Z","updated_at":"2025-04-15T00:23:38.404Z","avatar_url":"https://github.com/scottdurow.png","language":"TypeScript","readme":"# dataverse-auth\nCross-platform pure NodeJS On-behalf-of authentication against Microsoft dataverse Pro. Stores the token for use with NodeJS applications such as [dataverseify](https://github.com/scottdurow/dataverse-ify)\n\n\u003e **Note:** Version 2 of dataverse-auth is not compatible with version Version 1 of dataverse-ify and dataverse-gen.\n  Use npx dataverse-auth@1 instead if you want to continue to use the older version\n\n## Usage\n`~$ npx dataverse-auth [environment]`\\\nE.g.\\\n`~$ npx dataverse-auth contosoorg.crm.dynamics.com`\n\n### Optional - specify tenant url\nYou you want to specify the tenant Url rather that it be looked up automatically\n`~$ npx dataverse-auth [tennant] [environment]`\\\nE.g.\\\n`~$ npx dataverse-auth contoso.onmicrosoft.com contosoorg.crm.dynamics.com`\nFor more information see the [dataverse-ify project](https://github.com/scottdurow/dataverse-ify)\n\n## Other commands\n- `npx dataverse-auth list` : Lists the currently authenticated environments\n- `npx dataverse auth [environmentUrl] test-connection` : Tests a previously authenticated environment\n- `npx dataverse auth [environmentUrl] remove` : Removes the stored token for an authenticated environment\n- `npx dataverse auth [environmentUrl] device-code` : Adds an authentication profile using the device-code flow. Use this if you are having trouble authenticating using the interactive prompt.\n\n## Tested on\n- Linux\n  - ✔ Manjaro\n  - ✔ Ubuntu\n  - ✔ Debian (see workaround below)\n- MacOS\n  - ✔ 10.15\n- Windows\n  - ✔ 10\n\n## Debian install\nBy default the Debian kernel is hardened and proactively deny unprivileged user namespaces. This causes an issue when you install electron or packages depending on it, and there are (at least) two ways to bypass that.\n\n### Method1, enable unprivileged namespaces\nFor NPX to work you will have to enable unprivileged user namespaces. Instructions on how to do this is found in the [this article](https://wiki.debian.org/LXC#Configuration_of_the_host_system) \n\n### Method2, install and modify permissions\nFirst, install the NPM package, globally or in a dedicated project. After the install navigate to $NPM_PACKAGES/lib/node_modules/dataverse-auth/node_modules/electron/dist (tip: if you try to run dataverse-auth the full path will be in the error message)\nChange the owner of chrome-sandbox to root and chmod it to 4755:  \n`~$ sudo chown root chrome-sandbox \u0026\u0026 sudo chmod 4755 chrome-sandbox`\n\nNow you can run it like any other package:  \n`~$ dataverse-auth myorg.crm.dynamics.com`\n\n## MacOS, Apple Silicon usage\nVersion 2 is required to work on MacOS Apple Silicon - `npx dataverse-auth@2 \u003corg url\u003e`.\n\n### Build \u0026 Test\n`dataverse-auth` uses electron which uses node-gyp. You will need to install Python and Visual Studio C++ core features.\nTo build \u0026 test locally, use:\n```\nnpm run start org.api.crm3.dynamics.com\nnpm run start list\nnpm run start org.api.crm3.dynamics.com test-connection\n```\n\n### ADAL -\u003e MSAL\nAs of version 2, dataverse-ify now uses MSAL for all authentication based on guidance given by https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-node-migration\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottdurow%2Fdataverse-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscottdurow%2Fdataverse-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottdurow%2Fdataverse-auth/lists"}