Hi @Dan Morris ,
I use the following code based on your description, and it works well for me.
Have you tried reinstalling the Microsoft.Identity.Web.DownstreamApi package or running the dotnet restore command in the NuGet Package Manager Console?
using Microsoft.Extensions.Logging;
using Microsoft.Identity.Web;
using Microsoft.Extensions.DependencyInjection;
namespace HelloPlugin
{
public class HelloCommand : PluginBase.ICommand
{
public string Name { get => "hello"; }
public string Description { get => "Displays hello message."; }
public int Execute()
{
var tokenAcquirerFactory = TokenAcquirerFactory.GetDefaultInstance();
tokenAcquirerFactory.Services.AddLogging((loggingBuilder) => loggingBuilder.SetMinimumLevel(LogLevel.Warning).AddConsole());
Console.WriteLine("Hello !!!");
return 0;
}
}
}
Best Regards.
Jiachen Li
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.