After creating a new security key you will need to modify the permissions of the Admin group, but the User group permissions form does not allow it. This small AX job will grant the Admin group permissions to the new security key.
static void grantSafetyAccess(Args _args)
{
#Admin
SecurityKeySet securitySet;
;
setPrefix(funcName());
securitySet = new SecurityKeySet();
securitySet.loadGroupRights(#AdminUserGroup, '');
securitySet.access(securitykeynum(MyNewSecurityKey), AccessType::Delete);
xAccessRightsList::saveSecurityRights(securitySet.pack(), #AdminUserGroup, '');
}
There is also a method in xAccessRightsList that will rebuild the Admin group:
xAccessRightsList::createAdminitratorGroup();