protected override void ExecuteCmdlet()
        {
            var group = Identity?.GetDeletedGroup(AccessToken);

            if (group != null)
            {
                UnifiedGroupsUtility.PermanentlyDeleteUnifiedGroup(group.GroupId, AccessToken);
            }
        }
        public void PermanentlyDeleteUnifiedGroup()
        {
            UnifiedGroupsUtility.PermanentlyDeleteUnifiedGroup(_groupId, _accessToken);

            // The group should no longer be found in deleted groups
            try
            {
                var results = UnifiedGroupsUtility.GetDeletedUnifiedGroup(_groupId, _accessToken);
                Assert.IsFalse(results != null);
            }
            catch (Exception)
            {
                Assert.IsTrue(true);
            }
        }
 public void CleanUp()
 {
     try
     {
         UnifiedGroupsUtility.DeleteUnifiedGroup(_groupId, _accessToken);
     }
     catch (Exception)
     {
         // Group has already been deleted
     }
     try
     {
         UnifiedGroupsUtility.PermanentlyDeleteUnifiedGroup(_groupId, _accessToken);
     }
     catch (Exception)
     {
         // Group has already been permanently deleted
     }
 }
        public void PermanentlyDeleteUnifiedGroup()
        {
            if (string.IsNullOrEmpty(_accessToken))
            {
                Assert.Inconclusive("Access token could not be retrieved, so skipping this test");
            }

            UnifiedGroupsUtility.PermanentlyDeleteUnifiedGroup(_groupId, _accessToken);

            // The group should no longer be found in deleted groups
            try
            {
                var results = UnifiedGroupsUtility.GetDeletedUnifiedGroup(_groupId, _accessToken);
                Assert.IsFalse(results != null);
            }
            catch (Exception)
            {
                Assert.IsTrue(true);
            }
        }