How do I find the role id from an og group role name?
Found a helpful solution using a db query https://www.hashbangcode.com/article/load-drupal-organic-group-role-name

$roleid = db_query("SELECT rid, name FROM og_role WHERE gid = :gid and name = :name ORDER BY rid",array(':gid' =&gt; 14, 'name' =&gt; 'student'))-&gt;fetchAssoc();


Let me know in case there is any other or better solution, thanks!