Wednesday, May 8, 2024
HomePowershellGetting began with the official SailPoint IdentityNow PowerShell SDK - darrenjrobinson

Getting began with the official SailPoint IdentityNow PowerShell SDK – darrenjrobinson


This week as a part of the SailPoint Developer Days 2023 convention the SailPoint Developer Relations staff proudly introduced the official SailPoint IdentityNow PowerShell SDK. Additionally they introduced Typescript and Go, however I’m certain you’re right here for PowerShell.

I used to be very proud to be included within the announcement with Jordan Violet the top of Developer Relations at SailPoint after which adopted up by Philip Ellis who gave an summary of the SDKs. I used to be fortunate sufficient to get a heads-up on the SDKs and early entry to them to supply some suggestions to the staff, particularly in fact on the PowerShell SDK.

This submit will give my fast begin information to getting began with the PowerShell SDK so you can also begin utilizing it. Bear in mind, these SDKs are very recent and because the IdentityNow APIs themselves proceed to evolve the SDKs shall be routinely generated and refined.

SailPoint CLI

The SailPoint SDKs all leverage the SailPoint CLI. Yow will discover the newest model of the SailPoint CLI right here. Obtain the model on your structure. Being on Home windows that’s the Home windows AMD 64bit binary for me. Uncompress the archive and put the sail.exe binary in the identical listing you’ll create your PowerShell script.

When you’re up and operating you might think about placing sail.exe right into a location in your system surroundings paths or add the placement to your path surroundings.

While the PowerShell module leverages the CLI to carry out your automations, the CLI may also be used to rapidly configure your surroundings and authentication.

Firstly, you must specify the surroundings (your IdentityNow Tenant).
We try this utilizing the SailPoint CLI and the sail.exe surroundings command.

Present your IdentityNow tenant title and URIs.

.sail.exe surroundings
SailPoint IdentityNow PowerShell SDK Tenant Configuration

Now along with your IdentityNow Private Entry Token (PAT) credentials helpful run ‘sail.exe configure‘. Present your PAT Consumer ID and Consumer Secret.

SailPoint IdentityNow PowerShell SDK Personal Access Token Configuration

That’s it. The CLI is now configured along with your credentials that can persist between restarts because the CLI shops the configuration in your house listing.

Constructing and importing the SailPoint IdentityNow PowerShell SDK

Clone the newest PowerShell SDK from the GitHub repo right here and extract to your native improvement machine.

Construct and import the PowerShell Module.

.PSSailpointBuild.ps1
import-module .PSSailpointPSSailpoint.psm1

Record the Get cmdlets utilizing the next command. You should utilize the same command to search out cmdlets based mostly on the perform of them. e.g., Accounts, Profiles, Teams, Search.

Get-Command -Module PSSailpoint | where-object {$_.title -like "*Get-*" | Type-Object Identify | Get-Assist | Format-Desk Identify, Synopsis -Autosize

Utilizing the SailPoint IdentityNow PowerShell SDK Module

You’re now prepared for motion. You’ve configured the SailPoint CLI along with your Tenant and Private Entry Token particulars. You’ve cloned and imported the PowerShell SDK Module. Now let’s use it. The important thing place to begin is discovering the fitting cmdlet for what you need to do. I’ve discovered one of the best ways to try this is to make use of the Get-Command PowerShell command.

Get-Command -Module PSSailpoint | where-object {$_.title -like "Get-*Supply*"} | Type-Object Identify | Get-Assist | Format-Desk Identify, Synopsis -Autosize

Get Sources

Utilizing the instance above for Sources, understanding we need to “get” the sources from our IdentityNow surroundings let’s discover the fitting cmdlet. We’ve cmdlets to make use of each the Beta and v3 APIs for getting details about our sources. We’ll use Get-Sources to return all sources.

Relatively than outputting all of the details about all sources let’s give a number of extra parameters to record the important thing particulars. Record the sources with their title, sort, description and id.

get-sources | Choose-Object -Property title, sort, description, id | Type-Object title | Format-Record

Taking that one step additional we might see earlier there’s a Get-Supply cmdlet. Utilizing IntelliSense we will see it wants an Id parameter which we now have.

Getting and updating different IdentityNow entities

Utilizing the same technique, now you can discover the fitting cmdlet to get different Id entities similar to teams, profiles, and so on. For any of the IdentityNow entities, however much more so for search and updating entities look to the API reference documentation to grasp what the format and necessities of the related APIs are. The cmdlets are routinely generated from the API specs.

Abstract

SailPoint in the previous couple of years have gone from a standing begin with respect to developer relations to now having an superior staff delivering on a constant cadence deliver enhancements to the event capabilities of IdentityNow. They’re a incredible staff, that do care about what they do and the SailPoint developer neighborhood. They’ve taken numerous suggestions over the previous couple of years and it’s each refreshing and provoking to see the fruits of their efforts coming to the general public boards.

Lastly, do you need to contribute to the SDK, present examples, or repair one thing that’s damaged? Submit Points and PRs on GitHub.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments