Azure DevOps
Trustle’s Azure DevOps integration has two operating modes. Read-only mode gives Trustle updates on work item status and ends access when a linked work item closes. Read/write mode also lets Trustle create, modify, and close work items in Azure DevOps.
Prerequisites
Section titled “Prerequisites”- Permission to create a connection in Trustle.
- Permission to create service hook subscriptions in your Azure DevOps projects.
- For read/write mode, permission to create an app registration in the Azure portal and to add users in Azure DevOps organization settings.
Configure Azure DevOps
Section titled “Configure Azure DevOps”Step 1: Enable Azure DevOps Read-Only
Section titled “Step 1: Enable Azure DevOps Read-Only”Read-only mode ends access early when a linked work item closes. Trustle never calls the Azure DevOps API in this mode.
- In Trustle, create an Azure DevOps connection. Enter the organization slug exactly as it appears in
dev.azure.com/<organization>. Trustle refuses a webhook whose payload names a different organization. - Copy the webhook URL and the one-time secret from the response.
Trustle shows the secret once. To replace a lost secret, use the rotate-secret endpoint and update every subscription by hand.
- In Azure DevOps, open Project settings > Service hooks. Create two Web Hooks subscriptions: one for
workitem.createdand one forworkitem.updated. - On each subscription, set the URL to the Trustle webhook URL. Add the custom header
X-Api-Key: <secret>. - Repeat the previous two steps for every project in scope. Subscriptions are per project. All subscriptions post to the same URL with the same secret.
A requester pastes a work item URL into the access request reason. Trustle stores the link. When that work item closes, Trustle ends the access before its requested expiry.
Step 2: Enhance Trustle with Azure DevOps Read/Write (optional)
Section titled “Step 2: Enhance Trustle with Azure DevOps Read/Write (optional)”Read/write mode comments on work items, sets a status on approve or deny, and can open a work item for a request that cites none. This mode is off by default.
Create the app in Azure
Section titled “Create the app in Azure”- In the Azure portal, create an App registration (an Entra service principal).
- In API permissions, add a new permission:
Azure DevOps:user_impersonation. - Create a client secret.
- Save three values: the tenant ID, the application (client) ID, and the client secret.
- Enter these three values in Trustle as the connection’s credentials.
Give the app permission in Azure DevOps
Section titled “Give the app permission in Azure DevOps”- Open Organization settings > Users > Add users.
- Paste the application (client) ID. Do not paste the object ID.
- Set the access level to Basic.
- Add the app to the projects Trustle must write to.
Enable write-back
Section titled “Enable write-back”- In Trustle, turn on write-back on the connection. Configure the project, the work item type, the status names for approved and denied, and the default assignee.
- Optionally, assign all tickets to a designated user. If every access request must create a ticket, toggle Open a ticket for every request.
Verify
Section titled “Verify”- Close a work item that a requester linked to an access request.
- Confirm Trustle ends the linked access before its requested expiry.
- If read/write mode is on, approve or deny a request and confirm Trustle sets the configured status on the linked work item.