Has anybody used ADFS 2016 (4.0) API from C#. We have a small application using ADFS 3.0 and it works fine. Now we try to update it to ADFS 4.0. The architecture is a bit complex and it uses reflection.
The assembly used is Microsoft.IdentityServer.Management. There is not much information about it. The assembly is loaded and the difference comes when a command is invoked. In 4.0 the invoke fails with a message
"Cmdlets derived from PSCmdlet cannot be invoked directly".
Any tips using Microsoft.IdentityServer.Management from C# are appreciated.