Please teach me of "All users except external users" of Share point online.
With PowerShell or API, Can I get the members of "All users except external users".
And I want to remove the one members of "All users except external users".
Please teach me of "All users except external users" of Share point online.
With PowerShell or API, Can I get the members of "All users except external users".
And I want to remove the one members of "All users except external users".
Please note that “Everyone except external users” (All users except external users) is a group built into the SharePoint codebase rather than a modifiable object.
We cannot modify the membership of “Everyone except external users” as it does not actually have memberships.
Currently, there is no PowerShell script to get only tenant-wide internal users.
As a workaround, you can get the report for all user (including external users) using the "Export Users" feature via Microsoft 365 admin center > Users > Active users > Ellipsis (More actions) > Export Users. Then you can filter out the internal users in the exported CSV file, for example, by filtering "User principal name" field.

In addition, if you want to control which users can have access to SharePoint Online, consider using Conditional Access Policies to control user access instead.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Thanks a lot. Can I check the user of “Everyone except external users” by Get-SpoUser?
Now, I want to know about "Users of Get-SpoUser".
Because, After I ran "Set-SPOUser -Site $Site.URL -LoginName $Admin -IsSiteCollectionAdmin $false", $Admin remains as a member.
Occurs on 2 out of 1000 sites.
I checked.
After the $Admin connects with powershell, I could get $Admin with get-spouser.
Maybe, It is related “Everyone except external users”.
No. Get-SPOUser returns the SharePoint Online user or security group accounts that match a given search criteria. For example, you can get the users in a specific site by running:
Get-SPOUser -Site <SiteURL>
And if this site has granted permission for “Everyone except external users”, you will see it returned as member in the result.

The thing is, although “Everyone except external users” is a built-in domain group that represents “all internal users”, it is better to be considered as one object. It does not have the same function as a SharePoint group, so we will not get a list of users out of it.
Reference: Get-SPOUser.
After I ran "Set-SPOUser -Site $Site.URL -LoginName $Admin -IsSiteCollectionAdmin $false", $Admin remains as a member. Only 2 sites in 1000 sites.
Do you know why? I want to remove admin from list.
And this admin user isn't showing up in the user gui "https://-my.sharepoint.com/personal/* /_layouts/15/people.aspx?MembershipGroupId=0".
So, I can't ask the user to remove the admin.
DisplayName : AdminGet-SPOUser -Site https://-my.sharepoint.com/personal/ -LoginName admin@*** | fl
To answer your questions:
The command Set-SPOUser -Site $Site.URL -LoginName $Admin -IsSiteCollectionAdmin $false is used to remove the user $Admin from the Site Collection Administrators list. It does not remove the user from the site.
To remove a user from the site and also from the user information list, use the following command instead: Remove-SPOUser -Site $Site.URL -LoginName $Admin
References: Set-SPOUser. / Remove-SPOUser.
The site URL you refer to https://-my.sharepoint.com/personal/* is the link to user’s personal OneDrive site.
This is the default outcome when you run this command on global administrators, it does not necessarily mean the user has access to the site.
If you cannot find the Admin account in the site user information list, then there is no need to remove it.
Why is “Everyone except external users” added without user operation?
6 people are following this question.