0 votes

Hi,

looking for a solution or script to remove a user from all Online/O365/AAD groups.

The article I found is not working anymore and also I didn't found any script in your repository.

Thanks!

related to an answer for: Remove user from all Office 365 group
by (1.5k points)

1 Answer

0 votes
by (287k points)

Hello,

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

Ok, was not aware this script includes online groups as well. Will give it a try.

Thanks again and I would like to thank you for the excellent support. I have rarely seen such a fast and perfect response. Thank you very much <3

0

Hello,

Thank you for your good words, it is much appreciated! We do our best for our customers. Should you have any questions or need clarifications, do not hesitate to contact our Support Team.

0

Hi again,

script is working fine - but only for local groups Online groups are not fetched.

Might it because the "group" is a MS Team? So user is member of a team (which also belongs to a group).

0

Hello,

The script removes the target user from all the available Azure AD and on-premises AD groups. Meaning that if you see a group in Adaxes, the script will remove the user from the group. The only exceptions are the primary group (it can only be an on-premises AD group) and dynamic Azure groups.

0

Hm, ok I don't see the group itself in Adaxes, which would explain why group is not removed?

Adaxes image.png

Azure AD image.png

Anything I am missing?

0

Hello,

Please, log in to your Adaxes service with the credentials of the Adaxes service account (specified during the software installation) in the Administration console and check whether you see the group there. The following article should be helpful about the login part: https://www.adaxes.com/help/ChangeLogonAccountConsole.

0

Hi,

So I connected to our server with adaxes service account and opened admin console and logon is done as current user. The same user was used during installation.

Checking user I also don't see online group image.png

0

Hello,

Thank you for specifying. It looks like you did not register your Azure AD domain in Adaxes. The following FAQ article should be helpful: https://www.adaxes.com/questions/13360/how-do-i-manage-cloud-only-users-in-adaxes.

0

Hi,

this is already done image.png

0

Or do I need to add the cloud domain also here? image.png

0

Hello,

As it is mentioned in the article we referenced, registering your Microsoft 365 tenant in Adaxes does not provide access to cloud-only objects. You need to also register your Azure AD domain for that. The domain should be present under the Managed Domains node in the Administration console.

0

Hello,

after adding cloud domain to managed domains and running script again, all goups incl. online ones were removed and user was also removed from any MS Team he was member of.

Thanks!!! : )

Related questions

0 votes
1 answer

I was using this and it was working just fine. But now I get this error Method not found: 'Void Azure.Core.TokenRequestContext..ctor(System.String[], System.String, System. ... String, Boolean)'. Stack trace: at &lt;ScriptBlock&gt;, &lt;No file&gt;: line 5

asked Sep 20 by raphaelgagnon (40 points)
0 votes
1 answer

After disable user, not user found or show when try to enable...i follow and try many way yet still not showing.. please help i;m using the ... -not-show-disabled-account https://www.adaxes.com/help/PreventUsersFromViewingTheStructure/#change-top-level-node

asked Oct 23, 2023 by kimtienh (20 points)
0 votes
1 answer

Hi, something has happened to our shared mailbox creation, on prem and syncing with o365 (we're a hybrid environment) the process works. With no issues. When a new shared ... I'm assuming at the moment it's an Adaxes issue with accessing the o365 information.

asked Jan 27, 2023 by gazoco (490 points)
0 votes
1 answer

Hello, When attempteing to edit the Softerra.Adaxes.Service.exe.Config file there is no listed allowedDomainControllers XML element in my file. According ... /help/?HowDoI.ManageActiveDirectory.ManageDomains.SpecifyDCsForDomain.html Thanks for your assitance!

asked Oct 26, 2020 by sgordon213 (110 points)
3,528 questions
3,218 answers
8,200 comments
547,635 users