Notes: This package contains the source code for a sample Query Utility for the Centrify Identity Service Platform API's written in C#. The solution Centrify.Samples.DotNet.QueryUtility.sln (VS 2015) contains two projects:
- Centrify.Samples.DotNet.ApiLib - Includes a general REST client for communicating with the CIS Platform, as well as a class, ApiClient, which uses the REST client to make calls to specific platform API's.
- Centrify.Samples.DotNet.QueryUtility - A sample console application utility which utilizes the ApiLib project to authenticate a user, query the platform API's using queries found in the Queries.json file, and export the results to CSV for further use (i.e. sending reports via email, ingesting into other database systems, automating the capturing and storage of reports/queries, use in data warehouse solutions and ETL's such as SSIS, etc). The utility will also back up old output files when it notices that the day has changed since its last run.
This utility, as mentioned above has many uses such as exporting reports, exporting analytic information, and aggregating any data within the Centrify Identity Platform data tables. Please see the reports menu in the Centrify Cloud Manager for more information on what tables exist and what data exists in the tables.
- First compile the solution in Release
- Copy the contents of the Relase folder to a location of your choice
- Open the Queries.json file and customize desired queries. Default queries are all event log entries for the day and all proxy entries
- Open the App.config file and customize your Centrify tenant url, admin username, and admin password. Make sure the admin account is set to not use MFA or the utility will fail.
- Run utility from command line or by double click
- Results will be located in the Output folder in the root of the utility directory.
- Use a scheduling tool, such as Windows Task Scheduler, to run the utility on a scheduled basis. The utility can be ran as often as desired as long as it has a chance to finish running before it is ran again.
- Make use of exported CSV files in desired use case, or add fucntionality to the sample project to mett the needs of desired use case.