0 votes

In the de-provisioning process, I need to remove all users from all Office 365 groups (UnifiedGroups). I tried to adapt this script but unsuccessfully.
https://www.adaxes.com/script-repositor ... -s360.htm

Is there any way to do this?

by (70 points)

1 Answer

0 votes
by (293k points)
selected by
Best answer

Hello,

Have a look at the following script from our repository: https://www.adaxes.com/script-repositor ... s-s554.htm.

Script not found, any update?
0

Same here. Link goes to a page not found. Would like to implement this as well.

0

Hello Mark,

In Adaxes 2023 and later you can register your Azure AD domain and use the following script to remove users from all groups including cloud ones: https://www.adaxes.com/script-repository/remove-all-group-memberships-for-a-user-account-s33.htm.

0

@support2, I have my Azure/O365 tenant connected through app registration and already have that script added under a business rule. However, I can tell you that it did not strip any Azure groups from a user that we tested on Friday (9/29). The only thing it worked on was our on-prem groups that the user object was a member of.

0

Hello Mark,

As we mentioned above, you need to register your Azure AD domain, not only your Microsoft 365 tenant in Adaxes. As a result, the domain will be displayed under the Managed Domains node in the Administration console. For information on how to register a domain in Adaxes, see https://www.adaxes.com/help/RegisterUnregisterManagedDomain. On step 5 of the guide, select Cloud domain. You can use the same Azure app credentials as those specified for your Microsoft 365 tenant.

0

@support2, thank you for the clarification. I was misunderstanding the cloud services registration step and did not realize that the Azure domain itself will have to be registered separately. I will get that configured now.

Related questions

0 votes
1 answer

Hi Guys, I'm trying to clean all users from Local Group test_group, and next new bunch of users form TXT fiel, by executing the following script as a scheduled task Import-Module ... .txt I have only 600 users. Do you have any idea how to improve this script?

asked Feb 27, 2015 by axmaster (510 points)
0 votes
1 answer

I am using this script to remove all users from groups when they are terminated. This script doesn't remove users from Azure only groups just on prem. How would I change ... .LogMessage("Can not remove $U from $GN"+$_.Exception.Message, "Information") } }

asked Jun 18 by mightycabal (1.0k points)
0 votes
1 answer

I would like to have a script that removes the offboarded users from all teams groups

asked Jan 3 by bodson (20 points)
0 votes
1 answer

https://www.adaxes.com/script-repository/remove-all-group-memberships-for-a-user-account-s33.htm I found this script but it only removes 365 groups, security groups, and ... user from all shared mailboxes they are a member of when disabling a user. Thanks!

asked Sep 8, 2023 by silicondt (60 points)
0 votes
1 answer

Currently, when I disable a user account in Adaxes, the group memberships of the user remain intact. I'd like to automate the removal of group memberships such as distribution ... a list of groups/DL that the user was previously in and removed from. Thanks!

asked Nov 3, 2021 by jayden.ang (20 points)
3,574 questions
3,263 answers
8,282 comments
548,006 users