Azure DevOps Task for AzureAD
Introduction
This is a WIP project, though the task is in a working condition. It is made possible by building on this version of the Powershell task by Microsoft.
The task is currently using the Powershell module AzureADPreview
, and powershell code can be written and injected into the task to target the module. It has the same functionality as the builtin Azure Powershell task, though instead of the Az
module it uses AzureADPreview
and MSAL.PS
(authentication) modules.
Getting Started
To build this extension on your machine and upload it privately to your AzDO account:
- Clone this repository
- Navigate to the directory the repository was cloned into on your machine via Command Prompt
- Download the latest version of node here
- After installing node, close your current Command Prompt window and reopen a new window
- You will also need to install the 'TFS Cross Platform Command Line Interface' (tfx-cli) to package your extension. tfx-cli can be installed using npm by running
npm i -g tfx-cli
- Sign in to the Visual Studio Marketplace management portal
- If you don't already have a publisher, you will be prompted to create one. All extension live under a publisher
- Open your extension manifest file: 'vss-extension.json' and set the value of the "publisher" field to the ID of your publisher
- From the Command Prompt window, run
tfx extension create --rev-version
. This will also increment build number. - Running the above command will generate a .vsix file
- Click the
+ New extension
option and select Visual Studio Team Services - Click the link in the center of the Upload dialog to open a browse dialog
- Locate the .vsix file created in the packaging step and upload it in the dialog box
- A private version of this extension should now be uploaded to your AzD account
To test your private extension:
- From the management portal, select your newly uploaded extension from the list, right-click, and choose
Share/Unshare
- Click the
+ Account button
, enter the name of your account, and press enter - After sharing this extension with your AzD account, you must now install it to your account
- Right-click your extension and choose View Extension to open its details page
- Click the
Get it free
button to start the installation process (the account you shared the extension with should be selected) - Click the
Install
button - Your extension should now be installed to your account and ready to use as build and release tasks
Build and Test
TODO: Describe and show how to build your code and run the tests.