Exchange Online: Default Role Assignment Policy

%3CLINGO-SUB%20id%3D%22lingo-sub-3267676%22%20slang%3D%22en-US%22%3EExchange%20Online%3A%20Default%20Role%20Assignment%20Policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3267676%22%20slang%3D%22en-US%22%3E%3CP%3EHello!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20a%20small%20help.%20I%20created%20the%20%22MyBaseOptions-DisableForwarding%22%20on%20the%20Default%20Role%20Assignment%20Policy.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20remove%20that%20change%20from%20the%26nbsp%3BDefault%20Role%20Assignment%20Policy%20and%20add%20it%20to%20a%20new%20role%20policy%2C%20but%20I%20am%20not%20sure%20what%20command%20would%20remove%20only%20the%26nbsp%3B%22MyBaseOptions-DisableForwarding%22%20that%20I%20added%20by%20running%20the%20%22New-ManagementRole%26nbsp%3BMyBaseOptions-DisableForwarding%26nbsp%3BParent%20MyBaseOptions%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%26nbsp%3Bso%20much%20in%20advance.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3267676%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3270407%22%20slang%3D%22en-US%22%3ERe%3A%20Exchange%20Online%3A%20Default%20Role%20Assignment%20Policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3270407%22%20slang%3D%22en-US%22%3EYou%20cannot%20remove%20default%20roles.%20You%20can%20remove%20a%20role%20assignment%20for%20a%20default%20role%2C%20via%20the%20Remove-ManagementRoleAssignment%20cmdlet.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3269940%22%20slang%3D%22en-US%22%3ERe%3A%20Exchange%20Online%3A%20Default%20Role%20Assignment%20Policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3269940%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20STHLM%2C%3CBR%20%2F%3E%3CBR%20%2F%3ERun%20the%20following%20PowerShell%20CMD%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20below%20will%20show%20you%20all%20roles%20for%20default%20role%20assignment%20and%20look%20for%20your%20role%20you%20created%20%22MyBaseOptions-DisableForwarding%22%20take%20a%20snipping%20tool%20of%20the%20results...%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CEM%3E%3CSTRONG%3EGet-ManagementRoleAssignment%20-RoleAssignee%20%22Default%20Role%20Assignment%20Policy%22%20%7C%20Format-Table%20Name%2CRole%20-Auto%3C%2FSTRONG%3E%3C%2FEM%3E%3CBR%20%2F%3E%3CBR%20%2F%3EAnd%20run%20the%20below%20CMD%20to%20remove%20the%20role%3CBR%20%2F%3E%3CBR%20%2F%3E%3CEM%3E%3CSTRONG%3ERemove-ManagementRoleAssignment%20-Identity%20%22MyBaseOptions-DisableForwarding-Default%20Role%20Assignment%20Policy%22%3C%2FSTRONG%3E%3C%2FEM%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EThen%20compare%20your%20snipping%20tool%20and%20results%20from%20after%20removing%20the%20role.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20you%20are%20done!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3268110%22%20slang%3D%22en-US%22%3ERe%3A%20Exchange%20Online%3A%20Default%20Role%20Assignment%20Policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3268110%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3BWhat%20are%20the%20implications%20of%20removing%20the%20default%20role%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3268108%22%20slang%3D%22en-US%22%3ERe%3A%20Exchange%20Online%3A%20Default%20Role%20Assignment%20Policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3268108%22%20slang%3D%22en-US%22%3EThat's%20the%20actual%20Role%20entry%2C%20not%20a%20role%20assignment.%20Selecting%20it%20therein%20will%20create%20an%20assignment.%20To%20remove%20it%20from%20there%2C%20you%20need%20to%20delete%20the%20Role%20itself.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3267706%22%20slang%3D%22en-US%22%3ERe%3A%20Exchange%20Online%3A%20Default%20Role%20Assignment%20Policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3267706%22%20slang%3D%22en-US%22%3EThanks%20for%20your%20reply%20Vasil!%3CBR%20%2F%3EI%20ran%20the%20Get-ManagementRoleAssignment%20-Role%20%22MyBaseOptions-DisableForwarding%22%20and%20nothing%20came%20back%2C%20however%20I%20can%20see%20it%20under%20the%20Default%20Role%20Assignment%20Policy%20as%20an%20option%20to%20seelct%20or%20unselect%20under%20the%20MyBaseOptions.%20Is%20there%20any%20way%20I%20can%20remove%20it%20from%20there%20or%20restore%20the%20Default%20Role%20Assignment%20Policy%20to%20original%20state%20(out%20of%20the%20box)%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3267681%22%20slang%3D%22en-US%22%3ERe%3A%20Exchange%20Online%3A%20Default%20Role%20Assignment%20Policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3267681%22%20slang%3D%22en-US%22%3EIf%20you%20only%20used%20the%20New-ManagementRole%20cmdlet%2C%20the%20role%20is%20not%20%22added%22%20anywhere.%20You%20can%20check%20its%20current%20assignments%20via%3A%3CBR%20%2F%3E%3CBR%20%2F%3EGet-ManagementRoleAssignment%20-Role%20MyBaseOptions-DisableForwarding%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20needed%2C%20remove%20any%20existing%20assignment%20via%3A%3CBR%20%2F%3E%3CBR%20%2F%3ERemove-ManagementRoleAssignment%20%22Name%20value%20you%20obtained%20from%20the%20above%20cmdlet%22%3C%2FLINGO-BODY%3E
New Contributor

Hello!

 

I need a small help. I created the "MyBaseOptions-DisableForwarding" on the Default Role Assignment Policy. 

 

I would like to remove that change from the Default Role Assignment Policy and add it to a new role policy, but I am not sure what command would remove only the "MyBaseOptions-DisableForwarding" that I added by running the "New-ManagementRole MyBaseOptions-DisableForwarding Parent MyBaseOptions".

 

Thank you so much in advance. 

6 Replies
If you only used the New-ManagementRole cmdlet, the role is not "added" anywhere. You can check its current assignments via:

Get-ManagementRoleAssignment -Role MyBaseOptions-DisableForwarding

If needed, remove any existing assignment via:

Remove-ManagementRoleAssignment "Name value you obtained from the above cmdlet"
Thanks for your reply Vasil!
I ran the Get-ManagementRoleAssignment -Role "MyBaseOptions-DisableForwarding" and nothing came back, however I can see it under the Default Role Assignment Policy as an option to seelct or unselect under the MyBaseOptions. Is there any way I can remove it from there or restore the Default Role Assignment Policy to original state (out of the box)?
That's the actual Role entry, not a role assignment. Selecting it therein will create an assignment. To remove it from there, you need to delete the Role itself.

@Vasil Michev What are the implications of removing the default role?

Hi STHLM,

Run the following PowerShell CMD

 

The below will show you all roles for default role assignment and look for your role you created "MyBaseOptions-DisableForwarding" take a snipping tool of the results...


Get-ManagementRoleAssignment -RoleAssignee "Default Role Assignment Policy" | Format-Table Name,Role -Auto

And run the below CMD to remove the role

Remove-ManagementRoleAssignment -Identity "MyBaseOptions-DisableForwarding-Default Role Assignment Policy"

Then compare your snipping tool and results from after removing the role.

 

Then you are done!

You cannot remove default roles. You can remove a role assignment for a default role, via the Remove-ManagementRoleAssignment cmdlet.