/// <summary> /// Turns a string containing a Role Name into a native Okta Group object /// </summary> /// <param name="groupName">The name of a "role" or group</param> /// <returns>Okta Group object</returns> public Group GetOktaGroupByRoleName(string groupName) { Group group = new Group(); PagedResults<Group> groups = okta.groups.GetList(); foreach (Group oktaGroup in groups.Results) { if (oktaGroup.Profile.Name == groupName) { group = oktaGroup; break; } var id = oktaGroup.Id; } return group; }
public void CreateRole(string roleName) { Group oktaGroup = new Group(); oktaGroup.Profile.Name = roleName; okta.groups.Add(oktaGroup); }
public GroupUsersClient GetGroupUsersClient(Group group) { return new GroupUsersClient(group, BaseClient); }