Search code examples
autodesk-forgeautodeskautodesk-construction-cloud

Is there a way to skip the automatic assignment of template project members when adding an admin user to a template-created project?


I am currently working with the Autodesk Construction Cloud (ACC) Account Admin API to automate project creation and configuration based on templates. While following this Autodesk documentation, I encountered some confusing behavior regarding the assignment of project template members.

According to the documentation:

  • Step 3A: After cloning a project from a template, assigning a project admin via a POST request to /projects/{projectId}/users triggers the assignment of all template project members to the project.

  • Step 3B: Project members can be directly assigned using a POST request to /projects/{projectId}/users:import, as long as one of those users is an admin.

However, I observed that when adding an admin user through /users:import, it also triggers the assignment of all template project members to the project. This behavior is not mentioned in the documentation for Step 3B, despite being mentioned in 3A, which lead to some confusion.

Question:

Can you confirm whether both requests are intended to trigger the automatic assignment of template project members? If so, is there an alternative way to create a project from a template, add an admin user, and not trigger the automatic member assignment? There are some desired situations where I'd like to use some aspects of the template, without needing to automatically assign members.

Any insights or guidance on managing this process correctly would be appreciated.

Thank you for your assistance!


Solution

  • The way the tutorial was written is a bit confusing:

    • Option-A is meant for when you are using templates.
    • Option-B is meant for when you are not using templates

    There is a inconsistency how it works whether you are using templates or not:

    • When using a template, you will need to add a project admin right after POST projects for a project is fully created and listed in the UI. (If you do not add a user shortly after, project does not show in UI.)
    • When not using a template, POST projects will create an empty project.

    So to summarize, the behavior you observe is as expected. There is no option to suppress only member copying part.

    A workaround could be to create two templates: one with default members and the other one without any default members.

    I hope this explains.