I am using ASP.NET Zero MVC/jQuery edition for .NET Core.
I am attempting to create an Organization Unit (OU) for a tenant from a controller on the host side and running into an issue.
The following line of code:
await _organizationUnitAppService.CreateOrganizationUnit(organizationUnitDto);
Generates the following error:
Required permissions are not granted. At least one of these permissions must be granted: Managing organization tree
The full code I am using:
CreateOrganizationUnitInput organizationUnitDto = new CreateOrganizationUnitInput()
{
    DisplayName = OUCode
};
var user = _userManager.FindByNameAsync(TenantName);
using (_session.Use(TenantID, user.Id))
{
    try
    {
        await _organizationUnitAppService.CreateOrganizationUnit(organizationUnitDto);
    }
    catch(Exception ex)
    {
        var e = ex.Message.ToString();
    }
}
				
                        
_organizationUnitAppService.CreateOrganizationUnithas theAbpAuthorizeattribute:Grant the
Managing organization treepermission to the user: