Skip to content

Instantly share code, notes, and snippets.

@JaimeStill
Last active November 22, 2024 09:09
Show Gist options
  • Save JaimeStill/539af65518091f7b8e6b9e003a493baa to your computer and use it in GitHub Desktop.
Save JaimeStill/539af65518091f7b8e6b9e003a493baa to your computer and use it in GitHub Desktop.
ASP.NET Core Active Directory Integration

Active Directory Authentication

This will provide an example of integrating Active Directory authentication in an ASP.NET Core app.

Note, you'll need to be running on a Windows domain with Visual Studio debugging in IIS Express for this to work.

Setup

In launchSettings.json, you'll want to modify iisSettings by turning on windowsAuthentication:

launchSettings.json

{
  "iisSettings": {
    "windowsAuthentication": true,
    "anonymousAuthentication": false,
    "iisExpress": {
      "applicationUrl": "http://localhost:5000"
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "FullstackOverview.Web": {
      "commandName": "Project",
      "launchBrowser": true,
      "applicationUrl": "http://localhost:5000",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}

Identity Project

Create a netcoreapp2.2 class library (I tend to name mine {Project}.Identity).

You'll need to add the following NuGet packages to this library:

  • Microsoft.AspNetCore.Http
  • Microsoft.Extensions.Configuration.Abstractions
  • Microsoft.Extensions.Configuration.Binder
  • System.DirectoryServices
  • System.DirectoryServices.AccountManagement

Here is the infrastructure of this class library:

  • Extensions
    • IdentityExtensions.cs
    • MiddlewareExtensions.cs
  • AdUser.cs
  • AdUserMiddleware.cs
  • AdUserProvider.cs
  • IUserProvider.cs

AdUser.cs

I use this class so I can create a Mock implementation of this library for when I'm building outside of a domain environment. This relieves me of the dependency on UserPrincipal.

using System;
using System.DirectoryServices.AccountManagement;
using System.Linq;
using System.Security.Principal;
using System.Threading.Tasks;

namespace Project.Identity
{
    public class AdUser
    {
        public DateTime? AccountExpirationDate { get; set; }
        public DateTime? AccountLockoutTime { get; set; }
        public int BadLogonCount { get; set; }
        public string Description { get; set; }
        public string DisplayName { get; set; }
        public string DistinguishedName { get; set; }
        public string Domain { get; set; }
        public string EmailAddress { get; set; }
        public string EmployeeId { get; set; }
        public bool? Enabled { get; set; }
        public string GivenName { get; set; }
        public Guid? Guid { get; set; }
        public string HomeDirectory { get; set; }
        public string HomeDrive { get; set; }
        public DateTime? LastBadPasswordAttempt { get; set; }
        public DateTime? LastLogon { get; set; }
        public DateTime? LastPasswordSet { get; set; }
        public string MiddleName { get; set; }
        public string Name { get; set; }
        public bool PasswordNeverExpires { get; set; }
        public bool PasswordNotRequired { get; set; }
        public string SamAccountName { get; set; }
        public string ScriptPath { get; set; }
        public SecurityIdentifier Sid { get; set; }
        public string Surname { get; set; }
        public bool UserCannotChangePassword { get; set; }
        public string UserPrincipalName { get; set; }
        public string VoiceTelephoneNumber { get; set; }
        
        public static AdUser CastToAdUser(UserPrincipal user)
        {
            return new AdUser
            {
                AccountExpirationDate = user.AccountExpirationDate,
                AccountLockoutTime = user.AccountLockoutTime,
                BadLogonCount = user.BadLogonCount,
                Description = user.Description,
                DisplayName = user.DisplayName,
                DistinguishedName = user.DistinguishedName,
                EmailAddress = user.EmailAddress,
                EmployeeId = user.EmployeeId,
                Enabled = user.Enabled,
                GivenName = user.GivenName,
                Guid = user.Guid,
                HomeDirectory = user.HomeDirectory,
                HomeDrive = user.HomeDrive,
                LastBadPasswordAttempt = user.LastBadPasswordAttempt,
                LastLogon = user.LastLogon,
                LastPasswordSet = user.LastPasswordSet,
                MiddleName = user.MiddleName,
                Name = user.Name,
                PasswordNeverExpires = user.PasswordNeverExpires,
                PasswordNotRequired = user.PasswordNotRequired,
                SamAccountName = user.SamAccountName,
                ScriptPath = user.ScriptPath,
                Sid = user.Sid,
                Surname = user.Surname,
                UserCannotChangePassword = user.UserCannotChangePassword,
                UserPrincipalName = user.UserPrincipalName,
                VoiceTelephoneNumber = user.VoiceTelephoneNumber
            };
        }
        
        public string GetDomainPrefix() => DistinguishedName
            .Split(',')
            .FirstOrDefault(x => x.ToLower().Contains("dc"))
            .Split('=')
            .LastOrDefault()
            .ToUpper();
    }
}

IUserProvider.cs

I use this interface so that I can create an additional provider in a mock library that implements this interface so I don't have to be connected to an AD domain while at home.

using System;
using System.Collections.Generic;
using System.Security.Principal;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;

namespace Project.Identity
{
    public interface IUserProvider
    {
        AdUser CurrentUser { get; set; }
        bool Initialized { get; set; }
        Task Create(HttpContext context, IConfiguration config);
        Task<AdUser> GetAdUser(IIdentity identity);
        Task<AdUser> GetAdUser(string samAccountName);
        Task<AdUser> GetAdUser(Guid guid);
        Task<List<AdUser>> GetDomainUsers();
        Task<List<AdUser>> FindDomainUser(string search);
    }
}

AdUserProvider.cs

Because you're using Windows authentication, the HttpContext will contain an IIdentity of the user logged into the domain that is accessing the web app. Because of this, we can leverage the System.DirectoryServices.AccountManagement library to pull their UserPrincipal.

using System;
using System.Collections.Generic;
using System.DirectoryServices.AccountManagement;
using System.Linq;
using System.Security.Principal;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Project.Identity.Extensions;

namespace Project.Identity
{
    public class AdUserProvider : IUserProvider
    {
        public AdUser CurrentUser { get; set; }
        public bool Initialized { get; set; }
        
        public async Task Create(HttpContext context, IConfiguration config)
        {
            CurrentUser = await GetAdUser(context.User.Identity);
            Initialized = true;
        }
        
        public Task<AdUser> GetAdUser(IIdentity identity)
        {
            return Task.Run(() =>
            {
                try
                {
                    PrincipalContext context = new PrincipalContext(ContextType.Domain);
                    UserPrincipal principal = new UserPrincipal(context);
                    
                    if (context != null)
                    {
                        principal = UserPrincipal.FindByIdentity(context, IdentityType.SamAccountName, identity.Name);
                    }
                    
                    return AdUser.CastToAdUser(principal);
                }
                catch (Exception ex)
                {
                    throw new Exception("Error retrieving AD User", ex);
                }
            });
        }
        
        public Task<AdUser> GetAdUser(string samAccountName)
        {
            return Task.Run(() =>
            {
                try
                {
                    PrincipalContext context = new PrincipalContext(ContextType.Domain);
                    UserPrincipal principal = new UserPrincipal(context);
                    
                    if (context != null)
                    {
                        principal = UserPrincipal.FindByIdentity(context, IdentityType.SamAccountName, samAccountName);
                    }
                    
                    return AdUser.CastToAdUser(principal);
                }
                catch (Exception ex)
                {
                    throw new Exception("Error retrieving AD User", ex);
                }
            });
        }
        
        public Task<AdUser> GetAdUser(Guid guid)
        {
            return Task.Run(() =>
            {
                try
                {
                    PrincipalContext context = new PrincipalContext(ContextType.Domain);
                    UserPrincipal principal = new UserPrincipal(context);
                    
                    if (context != null)
                    {
                        principal = UserPrincipal.FindByIdentity(context, IdentityType.Guid, guid.ToString());
                    }
                    
                    return AdUser.CastToAdUser(principal);
                }
                catch (Exception ex)
                {
                    throw new Exception("Error retrieving AD User", ex);
                }
            });
        }
        
        public Task<List<AdUser>> GetDomainUsers()
        {
            return Task.Run(() =>
            {
                PrincipalContext context = new PrincipalContext(ContextType.Domain);
                UserPrincipal principal = new UserPrincipal(context);
                principal.UserPrincipalName = "*@*";
                principal.Enabled = true;
                PrincipalSearcher searcher = new PrincipalSearcher(principal);
                
                var users = searcher
                    .FindAll()
                    .AsQueryable()
                    .Cast<UserPrincipal>()
                    .FilterUsers()
                    .SelectAdUsers()
                    .OrderBy(x => x.Surname)
                    .ToList();
                    
                return users;
            });
        }
        
        public Task<List<AdUser>> FindDomainUser(string search)
        {
            return Task.Run(() =>
            {
                PrincipalContext context = new PrincipalContext(ContextType.Domain);
                UserPrincipal principal = new UserPrincipal(context);
                principal.SamAccountName = $"*{search}*";
                principal.Enabled = true;
                PrincipalSearcher searcher = new PrincipalSearcher(principal);
                
                var users = searcher
                    .FindAll()
                    .AsQueryable()
                    .Cast<UserPrincipal>()
                    .FilterUsers()
                    .SelectAdUsers()
                    .OrderBy(x => x.Surname)
                    .ToList();
                    
                return users;
            });
        }
    }
}

AdUserMiddleware.cs

Custom middleware for creating the IUserProvider instance registered with Dependency Injection (see Startup Configuration below).

using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;

namespace Project.Identity
{
    public class AdUserMiddleware
    {
        private readonly RequestDelegate next;
        
        public AdUserMiddleware(RequestDelegate next)
        {
            this.next = next;
        }
        
        public async Task Invoke(HttpContext context, IUserProvider userProvider, IConfiguration config)
        {
            if (!(userProvider.Initialized))
            {
                await userProvider.Create(context, config);
            }
            
            await next(context);
        }
    }
}

IdentityExtensions.cs

Utility extensions for only pulling users with a Guid, and casting UserPrincipal to AdUser.

using System.DirectoryServices.AccountManagement;
using System.Linq;

namespace Project.Identity.Extensions
{
    public static class IdentityExtensions
    {
        public static IQueryable<UserPrincipal> FilterUsers(this IQueryable<UserPrincipal> principals) =>
            principals.Where(x => x.Guid.HasValue);
            
        public static IQueryable<AdUser> SelectAdUsers(this IQueryable<UserPrincipal> principals) =>
            principals.Select(x => AdUser.CastToAdUser(x));
    }
}

MiddlewareExtensions.cs

Utility extension for making middleware registration in Startup.cs easy.

using Project.Identity;

namespace Microsoft.AspNetCore.Builder
{
    public static class MiddlewareExtensions
    {
        public static IApplicationBuilder UseAdMiddleware(this IApplicationBuilder builder) =>
            builder.UseMiddleware<AdUserMiddleware>();
    }
}

Startup Configuration

To access the current user within the application, in the Startup.cs class of your ASP.NET Core project, you need to register an IUserProvider of type AdUserProvider with Dependency Injection with a Scoped lifecycle (per HTTP request):

public void ConfigureServices(IServiceCollection services)
{
    // Additional service registration
    services.AddScoped<IUserProvider, AdUserProvider>();
    // Additional service registration
}

You then need to add the AdUserMiddleware to the middleware pipeline:

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
    // Additional Configuration
    app.UseAdMiddleware();
    // Additional Configuration
}

Accessing the Current User

Because the IUserProvider is configured in the middleware pipeline, and is registered with Dependency Injection, you can setup an API point to interact with the registered instance:

IdentityController.cs

[Route("api/[controller]")]
public class IdentityController : Controller
{
    private IUserProvider provider;

    public IdentityController(IUserProvider provider)
    {
        this.provider = provider;
    }

    [HttpGet("[action]")]
    public async Task<List<AdUser>> GetDomainUsers() => await provider.GetDomainUsers();

    [HttpGet("[action]/{search}")]
    public async Task<List<AdUser>> FindDomainUser([FromRoute]string search) => await provider.FindDomainUser(search);

    [HttpGet("[action]")]
    public AdUser GetCurrentUser() => provider.CurrentUser;
}
@sgsnikola1
Copy link

@danielts86,
I have implemented your solution and its working well for all GET methods, but if I try calling POST method, I am getting CORS error as well the error 401 (Unauthorized)... Thanks

@danielts86
Copy link

@danielts86,
I have implemented your solution and its working well for all GET methods, but if I try calling POST method, I am getting CORS error as well the error 401 (Unauthorized)... Thanks

You probably not send your object in JSON format, just use JSON.stringify(object)

@mca93
Copy link

mca93 commented Nov 12, 2019

Hello, please assist. I'm having an exception. See the trace below:
An unhandled exception occurred while processing the request.
InvalidOperationException: Unable to resolve service for type 'SB_AD.Idenetity.IUserProvider' while attempting to Invoke middleware 'SB_AD.Idenetity.AdUserMiddleware'.
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.GetService(IServiceProvider sp, Type type, Type middleware)

InvalidOperationException: Unable to resolve service for type 'SB_AD.Idenetity.IUserProvider' while attempting to Invoke middleware 'SB_AD.Idenetity.AdUserMiddleware'.
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.GetService(IServiceProvider sp, Type type, Type middleware)
lambda_method(Closure , object , HttpContext , IServiceProvider )
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass4_1.b__2(HttpContext context)
Microsoft.AspNetCore.CookiePolicy.CookiePolicyMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

@sgsnikola1
Copy link

sgsnikola1 commented Nov 12, 2019

@danielts86, thanks, I will give it a try.

@mca93, I believe you forgot to register dependencies inside ConfigureServices of your startup.cs. Check do you have this line:
services.AddScoped<IUserProvider, AdUserProvider>();

@sgsnikola1
Copy link

sgsnikola1 commented Nov 12, 2019

@danielts86, after stringify-ing my form data, I am able to hit the controller without errors but all data received by the controller is null...
part of my controller:
public IActionResult Update([FromForm] User userData) { }

User model is ok. I tried changing from "FromForm" to "FromBody" but then I am getting same 401 Unauthorized error. Data sent from the angular are in valid JSON format, like this
{"userName":"[email protected]","firstName":"John","lastName":"Doe", "status":true}

I also tried sending data via postman. Its working well If I send data as x-www-form-urlencoded and pass key/value data, but if I try setting header as applicaton/x-www-form-urlencoded inside Angular app, sent data are still null, (with or without JSON.stringify function). I really dont know what else to try...

@danielts86
Copy link

@sgsnikola1 -

  1. Don't use [FromForm] use [FromBody]
  2. Please share your the Angular Component submit method
  3. Are use using [HttpPost] attribute?
  4. Try to post without argument
  5. For Postman you also need to use Authorization NTLM
  6. Are you set Header Content-Type to application/json?

@sgsnikola1
Copy link

sgsnikola1 commented Nov 13, 2019

@danielts86

  1. I tried using [FromBody], I am getting 400 (Bad Request) error.
  2. I have already posted a question on SO but no result... here are all the details: https://stackoverflow.com/questions/58748706/issue-with-the-post-and-net-core-web-api-401-unauthorized-cors
  3. Yes I do
  4. Tried, still the same.
  5. Yes I know, I added it and it was working without issues.
  6. I am getting 401 Unauthorized if I set to application/json. I also tried to set to "application/x-www-form-urlencoded" as well to to send it without header, I am getting 400 (Bad Request).

Thank you.

## UPDATE ##
I was able to hit my controller and POST data after I did following changes:

  1. Changed controller attribute from "FromForm" to "FromBody".
  2. Changed angular post method to the following:
 headerOptions = new HttpHeaders({ 'Content-Type': 'application/json' 
 });

 update(data: Form) {
 return this.http.post(this.apiUrl + '/data/Update', JSON.stringify(data), { headers:  this.headerOptions });
 }
  1. Set "anonymousAuthentication: true" inside my launchSettings.json.

The new problem pops out because I can set this to true only for testing purposes, because I am using windows AD authentication. The problem I have now is that my user is null and rest of the app is not working because I am calling "public Task GetAdUser(IIdentity identity)" on application startup...

## FINAL SOLUTION ##

I have managed to solve the problem of null user by following answer from here: https://stackoverflow.com/questions/46084851/windows-and-anonymous-authentication-in-net-core-2-0/

People should just pay attention about the order of implementing this middleware, here is my order inside Configure method on Startup.cs

            app.UseCors("CorsPolicy");
            app.UseAnonMiddleware();
            app.UseAdMiddleware();
            app.UseMvc();

Thanks

@mca93
Copy link

mca93 commented Nov 18, 2019

@danielts86, thanks, I will give it a try.

@mca93, I believe you forgot to register dependencies inside ConfigureServices of your startup.cs. Check do you have this line:
services.AddScoped<IUserProvider, AdUserProvider>();

Hi @danielts86 thqnks for the response. Find below my ConfigureServices Method.

image

@sgsnikola1
Copy link

@mca93,
Why are you registering services.AddScoped<IUserProvider, AdUserProvider>(); inside your cookie configuration? Try placing it below services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); line.

Also I just double-checked your error message, it say "SB_AD.Idenetity.IUserProvider", IdenEtity, instead of Identity, you have an extra "E", so please correct that also.

@mca93
Copy link

mca93 commented Nov 20, 2019

@sgsnikola1
Thanks for your help. It is working perfectly. Solution was to register services.AddScoped<IUserProvider, AdUserProvider>() outside the cookie configuration.

IdenEtity - is because i named my namespace like that way.

@sgsnikola1
Copy link

@mca93, ok great.
Regarding the typo, I know, but I suggest to correct it because of future use.
Regards

@mca93
Copy link

mca93 commented Nov 24, 2019 via email

@danielts86
Copy link

danielts86 commented Nov 26, 2019

@sgsNone - Can you share your AnonMiddleware class and usage

@sgsnikola1
Copy link

@danielts86, here you go.
class

   public class AnonymousMiddleware
    {
        private readonly RequestDelegate next;

        public AnonymousMiddleware(RequestDelegate next)
        {
            this.next = next;
        }

        public async Task Invoke(HttpContext context)
        {
            if (context.User.Identity.IsAuthenticated)
            {
                await next(context);
                return;
            }

            await context.ChallengeAsync("Windows");
        }
    }

extension

public static IApplicationBuilder UseAnonMiddleware(this IApplicationBuilder builder) =>
            builder.UseMiddleware<AnonymousMiddleware>();

startup

app.UseCors("CorsPolicy");
app.UseAnonMiddleware();
app.UseAdMiddleware();
app.UseMvc();

@Vrankela
Copy link

Vrankela commented Feb 7, 2020

I am struggling with getting this working. I am getting an error. See below. Is there something i need to pass in to get the current app user?

_An unhandled exception occurred while processing the request.
ArgumentNullException: Value cannot be null.
Parameter name: identityValue
System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, IdentityType identityType, string identityValue)

Exception: Error retrieving AD User
CoreIdentity.AdUserProvider+<>c__DisplayClass9_0.b__0() in AdUserProvider.cs, line 42_

I have the exact same problem but only when I deploy the project to IIS server, locally however this works just fine. Has anyone had this issue and solved it?

@JaimeStill
Copy link
Author

@Vrankela, did you ensure that Windows Authentication is enabled and Anonymous Authentication is disabled on your IIS server? And that you are accessing the deployed app from a domain account? The error you're showing indicates that the user identity is not being provided to your app.

@Vrankela
Copy link

Vrankela commented Feb 7, 2020

@Vrankela, did you ensure that Windows Authentication is enabled and Anonymous Authentication is disabled on your IIS server? And that you are accessing the deployed app from a domain account? The error you're showing indicates that the user identity is not being provided to your app.

Yes Jamie, all of that. I even tested how it behaves when I just leave the windows authentication in launchSettings.json and remove the dependency injection from the two methods in Startup.cs. Then the browser just prompts me for my domain password and my app runs normally. But I really need your implementation as it allows me to further develop on it and filter through authorized users and user groups...

@hattabatatta
Copy link

hattabatatta commented Mar 18, 2020

Sorry for a maybe stupid question but how to implement a "filter" for user groups, based on MVC Controllers?
Like "SuperAdminController" is only accessible by the AD group "SuperAdmins" and a "NormalADUserController" which can be accessed by every user from the AD?
Like an authentication within an authentication ... authentiception :D

I hope you know what I mean :)

Every controller (also API controllers) will be first check if the call comes from an AD user, which is fine, but I need also want to have "user rights"

@JaimeStill
Copy link
Author

@hattabatatta perhaps this StackOverflow answer would be helpful?

@hattabatatta
Copy link

@hattabatatta perhaps this StackOverflow answer would be helpful?

Many thx for your quick answer
I´ll take a look at it ... I thought on dependency injection into contollers in first hand but if this will work ... also welcomed :)

@travbeamo
Copy link

Excellent work.

Do you know if/how this could possibly be converted into an external provider authentication in ASP.NET Core, where Startup.cs for the project would include something like:

services.AddAuthentication().AddActiveDirectory(options => {
  options.DomainName = Configuration["Authentication:ActiveDirectory:DomainName"];
});

@JaimeStill
Copy link
Author

Excellent work.

Do you know if/how this could possibly be converted into an external provider authentication in ASP.NET Core, where Startup.cs for the project would include something like:

services.AddAuthentication().AddActiveDirectory(options => {
  options.DomainName = Configuration["Authentication:ActiveDirectory:DomainName"];
});

@travbeamo I can't imagine this being too difficult to implement. That said, my bandwidth is very limited at the moment. If you're able to figure out an implementation for this, it would be awesome if you could share.

@MostafaNouri
Copy link

I'm using the IIS Express to deploy your nice project. When I use my local user (not administrator) the browser pop-up login form shows up but I want my custom login page. is it possible or not? I know that my question is somehow irrelevant to this context but I really need to know how can I do that.

@ajeyaprakash148
Copy link

I am getting below error.

System.DirectoryServices.AccountManagement.PrincipalServerDownException: 'The server could not be contacted.'

is there any help? whether we need to pass domain, user, pwd details?
PrincipalContext context = new PrincipalContext(ContextType.Domain);

@willerpp
Copy link

Excellent code, it works like a charm!!! thank you

@chantholkhom
Copy link

I am facing this error
2021-01-26_11-50-51

System.Exception: Error retrieving AD User
---> System.ArgumentNullException: Value cannot be null. (Parameter 'identityValue')
at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, IdentityType identityType, String identityValue)

@krizskp
Copy link

krizskp commented Mar 1, 2022

Anyone found a solution to this?

@kbrhoades
Copy link

I am fairly new so please forgive my ignorance. Using .NET Core 3.1, most other settings are OOB. I followed the instructions above to the letter, got through any build errors, but no matter how I configure everything all i get in either Postman or via web is a 404 error. Shouldn't this http://localhost:<port#>/api/identity/GetCurrentUser work? (Going to http://localhost:<port#> brings up the typical .net intro page).

Only mods to startup file were to add
services.AddScoped<IUserProvider, AdUserProvider>(); in ConfigureServices
app.UseAdMiddleware(); in Configure

Is there something so basic going on here that I am completely missing it? Many thanks for any advice.

@MatthiasMT
Copy link

Hi All, first things first, thank you so much for the code, this is a cool tool to have!

im encountering an issue im going to try and solve on my own but incase someone has come across it... im getting this:

image

@MatthiasMT
Copy link

Hi All, first things first, thank you so much for the code, this is a cool tool to have!

im encountering an issue im going to try and solve on my own but incase someone has come across it... im getting this:

image

Fixed it.... requires some experimentation but the issue was somewhere in the AdUser.cs file. Removing several attributes solved the issue:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment