Skip to content

A PowerShell module to interact with the IdentityNow REST API

License

Notifications You must be signed in to change notification settings

EUCTechTopics/PSIdentityNow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PSIdentityNow

PSIdentityNow powershell gallery License

Summary

A PowerShell module to interact with the IdentityNow REST API.

A bit more... I’m excited to share my first publicly released PowerShell module!
I decided to create this because the official SailPoint PowerShell module didn’t quite meet my needs when it came to error handling and ease of use.
My goal was to keep things as simple and modular as possible.
If you run into any bugs or have feedback, please let me know by raising an issue—I’d love to hear from you!

Key Features

  • Handles retrying failed request
  • Supports pagination
  • Automatically generates filter string

Currently supports the following Objects:

  • access-profiles
  • entitlements
  • public-identities
  • roles
  • requestable-objects
  • segments

Installation

Install-Module -Name PSIdentityNow -AllowPrerelease

SDK Configuration for Authentication

To use the SDK with your IdentityNow tenant, you must configure authentication by providing the required environment variables or using Azure Key Vault (or another vault) with the Microsoft.PowerShell.SecretManagement module.

Option 1: Use Environment Variables

  1. Set Environment Variables

    Set the following environment variables to authenticate to your IdentityNow tenant:

    $env:IDNW_BASE_URL=https://[tenant].api.identitynow.com
    $env:IDNW_CLIENT_ID=[clientID]
    $env:IDNW_CLIENT_SECRET=[clientSecret]

    Replace [tenant], [clientID], and [clientSecret] with your specific values.

    Alternatively, you can use instance specific environment variables. If these variables are set, you have to specify the -Instance parameter when running Connect-IDNW:

    $env:IDNW_ACC_BASE_URL=https://[tenant]-sb.api.identitynow.com
    $env:IDNW_ACC_CLIENT_ID=[clientID]
    $env:IDNW_ACC_CLIENT_SECRET=[clientSecret]
    $env:IDNW_PRD_BASE_URL=https://[tenant].api.identitynow.com
    $env:IDNW_PRD_CLIENT_ID=[clientID]
    $env:IDNW_PRD_CLIENT_SECRET=[clientSecret]
  2. Connect to IdentityNow

    Use the Connect-IDNW command to authenticate using secrets from the registered Key Vault. Specify the -Instance parameter (e.g., ACC or PRD) as needed:

    # Using generic environment variables
    Connect-IDNW
    
    # Using instance specific environment variables (ACC)
    Connect-IDNW -Instance ACC
    
    # Using instance specific environment variables (PRD)
    Connect-IDNW -Instance PRD

Option 2: Use Azure Key Vault with SecretManagement

You can securely store and manage the required credentials in Azure Key Vault and use the Microsoft.PowerShell.SecretManagement module to access them.

  1. Add Secrets to Key Vault

    Ensure the required secrets are stored in your Azure Key Vault. The secrets should correspond to the following environment variable names:

    IDNW-BASE-URL
    IDNW-CLIENT-ID
    IDNW-CLIENT-SECRET

    Alternatively, you can use instance specific environment variables. If these variables are set, you have to specify the -Instance parameter when running Connect-IDNW:

    IDNW-ACC-BASE-URL
    IDNW-ACC-CLIENT-ID
    IDNW-ACC-CLIENT-SECRET
    IDNW-PRD-BASE-URL
    IDNW-PRD-CLIENT-ID
    IDNW-PRD-CLIENT-SECRET
  2. Register your Key Vault

    Use the following command to register your Azure Key Vault:

    $kvparams = @{
        AZKVaultName = "KEYVAULT-NAME"
        SubscriptionId = "subscription-id"
    }
    Register-SecretVault -Name 'KEYVAULT-NAME' -ModuleName Az.KeyVault -VaultParameters $kvparams

    Replace KEYVAULT-NAME with your Key Vault name and subscription-id with your Azure subscription ID.

  3. Connect to IdentityNow using SecretManagement

    Use the Connect-IDNW command with the -UseSecretManagement parameter to authenticate using secrets from the registered Key Vault. Specify the -Instance parameter (e.g., ACC or PRD) as needed:

    # Using generic secrets
    Connect-IDNW -UseSecretManagement
    
    # Using instance specific secrets (ACC)
    Connect-IDNW -Instance ACC -UseSecretManagement
    
    # Using instance specific secrets (PRD)
    Connect-IDNW -Instance PRD -UseSecretManagement

    This retrieves the required secrets from your registered Key Vault and authenticates the SDK.

Notes

  • Make sure the Azure Key Vault and the Microsoft.PowerShell.SecretManagement module are properly configured and accessible from your environment.
  • For more information, consult the the SecretManagement module documentation.

Functions

Connects to IdentityNow.

Disconnects from IdentityNow.

Get the specified objects from IdentityNow.

Create a new object in IdentityNow.

Delete an object in IdentityNow.

Update an object in IdentityNow.

Reporting Issues and Feedback

Changelog