Share via


Sample Application

Sample applications are created in C# and JAVA languages and are available on GitHub

You can choose to take inspiration from the sample application and build your own application in any language.

The sample application achieves the following objectives:

  • Generates a Microsoft Entra Token.
  • Gets available datasets.
  • Creates user defined queries.
  • Gets user defined and system queries.
  • Schedules a report.

The sample application doesn't cover the method of calling APIs for other functionalities. However, the process of calling other APIs remains the same as outlined above.

How to run the application

  • Clone the repository to a local system using this command:
git clone https://github.com/partneranalytics/ProgrammaticExportSampleAppMPN.git

Note

For more instructions, refer to the ProgrammaticExportSampleAppMPN/README.md file in the GitHub repository.

  • To quickly run the app, update the client ID and client secret in the appsettings.Development.json

Illustrating appsetting development json

Running the app will start a local web server and a page will open (https://localhost:44365/ProgrammaticExportSampleApp/sample).

Illustrating UI of sample application

This page will make API calls to the webserver running on the local machine, which in turn will make the actual programmatic access API calls.

Code Snippets

The basic structure of the C# code for doing the programmatic access API calls is as follows:

Illustrating code snippet