Security
The caller must be at least a member of role: Customer
Administrator
Permission Check
No explicit permission check is required for this procedure. The
procedure calls Managed Plans::RemovePlanFromCustomer which tests
the caller for the Customer Administrator (UserCreators).
Preconditions
The specified organization was previously subscribed to the
service.
Business Rules
The organization cannot be unsubscribed from the service if any
users in the organization are enabled for the service.
Post-conditions
- The Office Communications Server plan is no longer assigned to
the organization.
- The Office Communications Server users plans assigned to the
Available Plan list of the organization are removed from that
list.
- The SIP Domains which belong to the organization are
removed.
- The Office Communications Server Pool assignment for the
organization is removed.
Sequence Narrative
- Actor submits Unsubscribe request to the Hosted Office
Communications Server namespace.
- The Unsubscribe procedure calls the
GetOrganizationPlanAssignment procedure, which will retrieve
the plan assigned to the organization. This validates that the
organization is subscribed to the Office Communications Server
service.
- The Unsubscribe procedure calls Managed Plans::ExecPlanSQL_ to
execute the new stored procedure spCountOrgUsersByPlanType. The
planTypeName = 'OCSUserHosting'. This will return a count of the
users with an active OCSUserHosting plan assignment.
- Alt: If the count returned by Managed Plans::ExecPlanSQL_ is
greater than 0, then an InvalidOperationException (0x80131509) is
raised. The exception states that the operation cannot be performed
until the users have been deleted with DeleteSipDomain.
- The Unsubscribe procedure calls the
GetOrganizationAvailablePlans. This will return zero or more
available plans assigned to the organization.
- For each availablePlans/planName, the Unsubscribe procedure
calls the Managed Plans::SetAvailablePlanStatus with
statusTypeName="Deleted".
- The Unsubscribe procedure calls Managed
Plans::RemovePlanFromCustomer with the planName equal to the
planName value returned by GetOrganizationPlanAssignment.
- The Unsubscribe procedure calls Managed Office
Communications Server::GetSipDomainsByOrganization. This will
return zero or more Sip Domains assigned to the organization.
- For each sipDomains/sipDomain, the Unsubscribe procedure calls
Managed Office Communications Server::DeleteSipDomain if the
SIP domain is owned by the organization.
- The Unsubscribe procedure calls Managed Office
Communications Server::DeletePoolAssignment to remove the pool
assignment. If there was one it would be deleted if not then it
would do nothing.
Exceptions
HResult |
Message |
Conditions |
0x80131509 |
Unable to unsubscribe the organization from the Hosted Office
Communications Service Plan. One or more users with a
OCSUserHosting plan were found in the organization. These users
must be disabled for the service with the DeleteSipUser
procedure. |
An attempt was made unsubscribe an organization from the OCS
service, but that organization still has users with OCSUserPlans
assigned. |