Is there an Example of C# app (it can be mvc .net core) when we use OKTA API for example get users.
Change password. Please point me if there is
Once you add the Okta.Sdk library via nuget you can do something like this to get users
using Okta.Sdk;
using Okta.Sdk.Configuration;
using System;
class Program
{
static void Main(string[] args)
{
var oktaClient = new OktaClient(new OktaClientConfiguration
{
OktaDomain = "<Your Okta Domain>",
Token = "<Your API Token>"
});
var users = oktaClient.Users.ListUsers().ToList();
foreach (var user in users)
{
Console.WriteLine(user.Profile.Email);
}
}
}
2 Likes
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.