What's the reason for not letting me add the role "Administrators" programatically to a user?

Vote:
 

Simple question really, I create users programatically and it goes fine. I can add users, EPiServerProfile properties and all roles except "Administrators". When adding it I get this error -> 

Provider Exception Caught
The role 'Administrators' was not found.

I get it after having checked if the role exists and after that adding it with ->

 Roles.AddUserToRole(userName, role);

I don't need to add the users to this group, I'm just curios. 

#122007
May 25, 2015 15:54
Vote:
 

Could it be that Administrators is a virtual role?

#122008
May 25, 2015 16:07
Vote:
 

From what I read here -> http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/7/Security/Virtual-Roles/ you're right. Thanks

#122011
May 25, 2015 17:04
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.