Skip to main content

SDK

Install package#

There is a .NET SDK for the Identity API published on nuget.

It can be found here:
https://www.nuget.org/packages/AIH.Identity.Clients

Install with (dotnet CLI):
dotnet add package AIH.Identity.Clients

Code Examples#

Printing all users in the system#

This is a console app that prints all users in the system.
Exchange URL_FOR_IDENTITYSERVER, CLIENT_ID, and SECRET with your own values.

using AIH.SDK.Clients;using AIH.Identity.Clients.v1_0;
namespace Example{    class Program    {        static async Task Main(string[] args)        {            var client = new IdentityClient(new(), "https://URL_FOR_IDENTITYSERVER",                new AIHClientAuthenticationOptions("https://URL_FOR_IDENTITYSERVER", "CLIENT_ID", "SECRET", "AIH.Identity"));
            var users = await client.UsersGetAsync();
            foreach (var u in users)            {                Console.WriteLine(u.FullName);            }        }    }}