Skip to content

Configuration Wiki Connection

Lewis Ginn edited this page Jun 9, 2026 · 2 revisions

Configuration — Wiki Connection

The wiki section tells PowerAutoDocs where to publish pages in your Azure DevOps Wiki. This is only needed if output.wiki: true.

Config

wiki:
  organisation: MyOrg
  project: MyProject
  wikiIdentifier: MyProject.wiki
  parentPath: /My Solution
  pat: REDACTED
Field Required Description
organisation Yes Your ADO organisation name — the part after dev.azure.com/ in your ADO URL
project Yes Your ADO project name
wikiIdentifier Yes The identifier of the wiki to publish to — see below for how to find it
parentPath Yes The wiki page path to publish documentation under (e.g. /My Solution)
pat Yes Always set to REDACTED in the committed file — the real value is injected at runtime

Finding your wikiIdentifier

The wiki identifier is the internal name ADO uses for your wiki. To find it:

  1. In your ADO project, go to Wiki in the left nav
  2. Look at the URL in your browser — it will look something like: https://dev.azure.com/MyOrg/MyProject/_wiki/wikis/MyProject.wiki/
  3. The identifier is the segment after /wikis/ — in this example: MyProject.wiki

If you have multiple wikis in your project, make sure you're copying the identifier for the correct one.

The PAT — why REDACTED is correct

pat: REDACTED in your committed config file is intentional. Committing a real Personal Access Token to a repo is a security risk — even private repos. Instead, PowerAutoDocs reads the real token from an environment variable at runtime and injects it into the config automatically.

How the injection works:

  • The pipeline (or your local shell) provides the token as an environment variable named WIKI_PAT
  • At runtime, the pipeline replaces REDACTED in the config with the real value before PowerAutoDocs reads it
  • The real token is never written to disk or stored in the repo

Creating a PAT for local use

If you're running PowerAutoDocs locally and publishing to ADO Wiki, create a PAT and set it as an environment variable before running:

  1. In ADO, click your profile picture (top right) → Personal access tokens

  2. Click New Token

  3. Give it a descriptive name (e.g. PowerAutoDocs Local)

  4. Set an appropriate expiry

  5. Under Scopes, select WikiRead & Write

  6. Click Create and copy the token immediately — ADO won't show it again

Then set it in your terminal session:

# macOS / Linux
export WIKI_PAT=your-token-here
npx powerautodocs@latest

# Windows (PowerShell)
$env:WIKI_PAT = "your-token-here"
npx powerautodocs@latest

Creating a PAT for the ADO pipeline

For the ADO pipeline, the PAT is stored as a secret pipeline variable. See Running via ADO Pipeline for the full steps.

parentPath

The parentPath controls where in the wiki hierarchy PowerAutoDocs publishes. For example, /My Solution publishes all pages under a top-level page called "My Solution".

You don't need to create this page in advance — PowerAutoDocs creates it automatically if it doesn't exist.

To publish at the wiki root, set parentPath: /.

Clone this wiki locally