GithubHelp home page GithubHelp logo

ercanipek / powershell-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sailpoint-oss/powershell-sdk

0.0 0.0 0.0 37.39 MB

PowerShell Module for accessing SailPoint IdentityNow APIs

Home Page: https://developer.sailpoint.com/

JavaScript 0.05% C# 0.50% PowerShell 98.54% Mustache 0.91%

powershell-sdk's Introduction

PowerShell SDK

Description

A PowerShell Module for accessing the SailPoint IdentityNow REST API's.

Installation

This module requires PowerShell version 6.2 or greater.

In order to read the yaml configuration file you will need to install the PSYaml Module.

Install-Module -Name PSYaml -RequiredVersion 1.0.2

Install the main module.

Install-Module -Name PSSailpoint

Proxy configuration

To use a proxy server, add the following configuration to your script.

$Proxy = New-Object System.Net.WebProxy("https://test.proxy.com:8080")

Set-DefaultConfiguration -Proxy $Proxy

Create a configuration file or save your configuration as environment variables

You can create a local configuration file using the CLI tool or you can store your configuration in environment variables

  • SAIL_BASE_URL
  • SAIL_CLIENT_ID
  • SAIL_CLIENT_SECRET

Examples

List Accounts with sourceId f4e73766efdf4dc6acdeed179606d694

$Limit = 250
$Offset = 0
$Count = $true
$Filters = 'sourceId eq "f4e73766efdf4dc6acdeed179606d694"'

# Accounts List
try {
    
    Get-Accounts -Limit $Limit -Offset $Offset -Count $Count -Filters $Filters

} catch {
    Write-Host ("Exception occurred when calling Get-Accounts: {0}" -f $_.ErrorDetails)
    Write-Host ("Response headers: {0}" -f $_.Exception.Response.Headers)
}

Search IdentityNow for all Identities

$Json = @"
{
	"indices": [
		"identities"
	],
	"query": {
		"query": "*",
		"fields": [
		"name"
		]
	}
	}
"@

$Search = ConvertFrom-JsonToSearch -Json $Json

try {
    Search-Post -Search $Search
} catch {
    Write-Host ("Exception occurred when calling Search-Post: {0}" -f $_.ErrorDetails)
    Write-Host ("Response headers: {0}" -f $_.Exception.Response.Headers)
}

Create a new Lookup transform

# Create transform
$JSON = @"
{
    "name": "New Transform",
    "type": "lookup",
    "attributes" : {
        "table" : {
            "USA": "Americas",
            "FRA": "EMEA",
            "AUS": "APAC",
            "default": "Unknown Region"
        }
    }
}
"@

$Transform = ConvertFrom-JsonToTransform -Json $JSON

 try {
    New-Transform -Transform $Transform
} catch {
    Write-Host ("Exception occurred when calling New-Transform: {0}" -f $_.ErrorDetails)
    Write-Host ("Response headers: {0}" -f $_.Exception.Response.Headers)
}

Get a list of Accounts with pagination

$Parameters = @{
    "Filters" = 'name co "Andrew"'
}

# Accounts List
try {

    Invoke-Paginate -Function "Get-Accounts" -Increment 250 -Limit 1000 -InitialOffset 0 -Parameters $Parameters

} catch {
    Write-Host ("Exception occurred when calling Invoke-Paginate: {0}" -f $_.ErrorDetails)
    Write-Host ("Response headers: {0}" -f $_.Exception.Response.Headers)
}

Get a list of Identities using search with pagination

$JSON = @"
{
	"indices": [
		"identities"
	],
	"query": {
		"query": "*",
		"fields": [
		"name"
		]
	},
	"sort": [
		"-displayName"
	]
	}
"@

$Search = ConvertFrom-JsonToSearch -Json $JSON

try {

    Invoke-PaginateSearch -Increment 50 -Limit 10000 -Search $Search

} catch {
    Write-Host ("Exception occurred when calling Invoke-PaginateSearch: {0}" -f $_.ErrorDetails)
    Write-Host ("Response headers: {0}" -f $_.Exception.Response.Headers)
}

powershell-sdk's People

Contributors

tyler-mairose-sp avatar philip-ellis-sp avatar anneragh avatar patrice-adp avatar jordan-violet-sp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.