Skip to main content
Skip table of contents

Automating Group Assignments

Overview

Mend does not have a built in method of automating the assignment of Groups to Roles. This process needs to be scripted out utilizing the Mend API. The goal of this document is provide guidance on the APIs needed to perform Group to Role mapping.

API Calls

Prior to scripting out the API process below a method to identify the groups that need to have a role assigned to them and the products they are to be assigned to needs to be determined and incorporated into the steps below.

  1. Login and save Bearer Token

    1. This token needs to be provided to authenticate to all subsequent requests

  2. Get the UUID of all Groups in the Organization

    1. Save the UUID of the desired group

  3. Pull the Projects and Products of the Organization

    1. Loop through all products and save the UUID of the desired products

  4. For each identified product, add the Group to the product as the desired role

Optional Calls

Assigning Users to Groups

If you are integrated into Mend using the SAML integration, this step is performed by the SAML integration the first time the user logs in. For more information see the SAML Access Control Setup Guide.

  1. Get All Users for the Organization

    1. Save the Email of the Desired Users

  2. Get the UUID of all Groups in the Organization

    1. Save the UUID of the desired group

  3. Add Users to the Desired Group

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.