How To Undo Set-MsolCompanySettings -UsersPermissionToReadOtherUsersEnabled $false

BearsBeetsBattlestar 0 Reputation points
2023-06-20T02:33:46.9933333+00:00

This appears to be a tenant wide command and no global admin account seems to be capable of undoing it with Set-MsolCompanySettings -UsersPermissionToReadOtherUsersEnabled $true. They all get access denied as one once expect given the $false setting, but we do need to undo this.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
24,637 questions
{count} votes

4 answers

Sort by: Most helpful
  1. risolis 8,741 Reputation points
    2023-06-23T01:07:17.86+00:00

    Many thanks for holding me on this.

    I would like to ask you if it is possible to check as well as adjust the following settings at the portal level and give it another try please.

    See it below:

    User's image

    User's image

    Looking forward to your feedback.

    Regards!


  2. risolis 8,741 Reputation points
    2023-06-23T02:05:16.08+00:00

    Hello @BearsBeetsBattlestar

    There you have the fix for your problem.

    I hope that can be useful for you.

    Looking forward to hearing from you

    Cheers,

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


  3. Alfredo Revilla - Upwork Top Talent | IAM SWE SWA 27,521 Reputation points Moderator
    2023-06-25T07:18:49.19+00:00

    Hello @BearsBeetsBattlestar and thanks for sharing your workaround. As a general rule we suggest to move to Microsoft Graph PowerShell SDK as a replacement for MSOnline since the latter has entered deprecation phase. Also, setting UsersPermissionToReadOtherUsersEnabled to false should only affect standard but not admin users. The error mesage and workaround signals access to the MSOnline module was disabled. Enable-AADIntTenantMsolAccess turned it on again calling the Update authorizationPolicy endpoint.

    To retrieve the authorization policy
    Connect-MgGraph -Scopes "Policy.Read.All"
    Get-MgPolicyAuthorizationPolicy
    
    To disable users reading other users profiles:
    Connect-MgGraph -Scopes "Policy.ReadWrite.Authorization"
    Update-MgPolicyAuthorizationPolicy -DefaultUserRolePermissions @{ AllowedToReadOtherUsers = $false}
    
    To re-enable MSOnline PowerShell module:
    Connect-MgGraph -Scopes "Policy.ReadWrite.Authorization"
    Update-MgPolicyAuthorizationPolicy -BlockMsolPowerShell $false
    

    Let us know if you need additional assistance. If the answer was helpful, please accept it and rate it so that others facing a similar issue can easily find a solution.

    0 comments No comments

  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.