Fixed lync object index range exceeded and missing tenant ID
This commit is contained in:
parent
5193588f18
commit
34543153b5
2 changed files with 39 additions and 29 deletions
|
@ -229,6 +229,34 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
|||
}
|
||||
}
|
||||
|
||||
if (lync.GetOrganizationTenantId(org.OrganizationId) == string.Empty)
|
||||
{
|
||||
PackageContext cntx = PackageController.GetPackageContext(org.PackageId);
|
||||
|
||||
org.LyncTenantId = lync.CreateOrganization(org.OrganizationId,
|
||||
org.DefaultDomain,
|
||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_CONFERENCING].QuotaAllocatedValue),
|
||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ALLOWVIDEO].QuotaAllocatedValue),
|
||||
Convert.ToInt32(cntx.Quotas[Quotas.LYNC_MAXPARTICIPANTS].QuotaAllocatedValue),
|
||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_FEDERATION].QuotaAllocatedValue),
|
||||
Convert.ToBoolean(cntx.Quotas[Quotas.LYNC_ENTERPRISEVOICE].QuotaAllocatedValue));
|
||||
|
||||
if (string.IsNullOrEmpty(org.LyncTenantId))
|
||||
{
|
||||
TaskManager.CompleteResultTask(res, LyncErrorCodes.CANNOT_ENABLE_ORG);
|
||||
return res;
|
||||
}
|
||||
else
|
||||
{
|
||||
PackageController.UpdatePackageItem(org);
|
||||
|
||||
bReloadConfiguration = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
LyncUserPlan plan = GetLyncUserPlan(itemId, lyncUserPlanId);
|
||||
|
||||
if (!lync.CreateUser(org.OrganizationId, user.UserPrincipalName, plan))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue