Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kenotron/ado-pat
A CLI and library to retrieve ADO PAT
https://github.com/kenotron/ado-pat
Last synced: 7 days ago
JSON representation
A CLI and library to retrieve ADO PAT
- Host: GitHub
- URL: https://github.com/kenotron/ado-pat
- Owner: kenotron
- Created: 2024-05-07T21:48:22.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-11-08T21:42:45.000Z (2 months ago)
- Last Synced: 2024-11-19T21:38:29.664Z (about 2 months ago)
- Language: TypeScript
- Size: 1.06 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ado-pat
`ado-pat` is a CLI and a library to help tool authors get a functioning user PAT for Azure DevOps. The package wraps the `msal-node` and `msal-node-extension` packages to do its work of retrieving an Entra ID access token with cached persistence.
## Installation
Globally
```
$ npm install --global ado-pat
```Locally
```
$ npm install ado-pat
```## Usage as CLI
Get help from the tool
```
$ ado-pat --helpUsage: ado-pat [options]
Options:
-t, --tenant-id Azure AD tenant ID
-d, --display-name Display name for the PAT
-o, --organization Azure DevOps organization name
-h, --help display help for command
```## Usage as Node.js API
(for now, this is a CommonJS package)
```js
const { getPAT, acquireEntraIdToken } = require("ado-pat");
const token = await acquireEntraIdToken();
const pat = await getPAT({
organization: "your org",
token: token.accessToken,
});
```