Request

Response

    Assign a Product to a User

    About this walkthrough

    In this walkthrough, you give a user access to a product, which is the core of onboarding a new user. The cURL examples show the structure of each request. You make the actual calls in Postman. You find the user (or invite them), choose a product pool, assign a seat from the pool, and then verify and remove the assignment.

    By the end of this walkthrough you will be able to:

    • Find a team user, or invite a person to your team.
    • Choose a product pool that has seats to assign.
    • Assign a product to a user.
    • Check which products a user holds, and remove a direct assignment.

    The walkthrough has four tasks:

    1. Find or Invite a User
    2. Choose a Product Pool
    3. Assign the Product
    4. Verify and Remove an Assignment

    You will use the following operations:

    OperationHTTP request
    List Team Users GET /teams/{team-id}/users
    Add Team User POST /teams/{team-id}/users
    Get Team User GET /teams/{team-id}/users/{user-id}
    List Product Pools GET /teams/{team-id}/product-pools
    List Assignments GET /teams/{team-id}/assignments
    Assign Product POST /teams/{team-id}/assignments
    Unassign Product DELETE /teams/{team-id}/assignments

    Before you begin

    Complete Get Started first. You need Postman set up with the Team Admin API collection, and the team_id variable set.

    This walkthrough needs more scopes than Get Started. When you get your access token, request all of these scopes:

    • tmadmapi:team:read
    • tmadmapi:team-users:write
    • tmadmapi:team-products:write

    Write scopes don’t grant read access, so you need tmadmapi:team:read as well. If your token from Get Started has only tmadmapi:team:read, get a new token that includes all three scopes. For more about scopes, see Authentication and Permissions.

    Warning: The invitation and assignment requests in this walkthrough change your real team. Use a team and a user that you are happy to change.

    Postman collection for this walkthrough

    You make the calls in this walkthrough with the Postman collection that you set up in Get Started. Each task names the request to run.

    As you work through the tasks, set these collection variables:

    • user_id and product_id, from your responses in Tasks 1 and 2.
    • lookup_email, for the request that finds a user by email address.
    • invite_email, for the invitation request.

    See also