I have to bulk-add a large number of users to a role, to this extent I am using the Add-RoleMember cmdlet.
If I run
Add-RoleMember -Identity "<role name>" -Members "name.lastname"
it works fine, however in our instance the users come from an Okta Membership Provider, where they are identified by their domain\email - such as
domain\[email protected]
When I try to run
Add-RoleMember -Identity "<role name>" -Members "domain\[email protected]"
I am greeted with a:
"Error: The name is improperly formatted. The name can only contain the following characters: a-z, 0-9, periods, dashes, underscores, backslashes, and spaces."
So there is ABSOLUTELY no way of using Add-RoleMember if my user name contains an @ sign, even though the Role already contains users with such character in the name? I surely hope this isn't the case, otherwise I will have to handle everything through code, which means I won't be able to do this until the next deployment.