I am writing some scripts for validating IDM functionality (e.g create user, search user, etc.) in Groovy and wanted to be able to run them offline. Is there a way to use the openidm. with authentication in a local script using the groovy runtime. E.g. do i need to authenticate / get token ahead of executing script? Was searching for some examples but could not find an example local groovy script library for testing purposes. Also, wanted this local so can run unit tests against them for validating scripts before pushing to environment.
If you’re leveraging the IDM REST API for user management, you can effectively validate IDM functionality using Groovy scripts in an offline, local environment. To achieve this, you will first need to authenticate before executing your script and acquire a valid access token, which is essential for making authenticated requests to IDM.
Once you’ve obtained the access token, you can use it in your subsequent API requests, enabling you to authenticate and execute actions such as user creation, user searches, and more.
Also, I am reaching out to our internal teams, who have greater expertise with Groovy, to see if we have any readily available sample scripts or a best practices approach that we can provide to assist you further in this process.