Hi <#C01P3H2HTDL|gooddata-cn> team, This question...
# gooddata-cn
n
Hi #gooddata-cn team, This question is related to step "Map a User in the Identity Provider to the Organization". Here for mapping a user to any gooddata organization, a POST request has been suggested as a mechanism. However this mechanism is not suitable in case 1. One user can map to multiple gooddata organizations. 2. In case, a new gooddata organization is created and existing multiple users need to be mapped in that new organization. Is there any better mechanism suggested by your team to automate user mapping considering the above two scenarios as well.
r
You may use declarative approach using
PUT /api/v1/layout/users
to map all the users in organization at once, or similar API
PUT /api/v1/layout/usersAndUserGroups
that also creates user groups. You can retrieve users from existing organization using GET and then PUT then to a new organization. See https://www.gooddata.com/developers/cloud-native/doc/2.0/api-and-sdk/api/api_reference_all/#/layout/putUsersLayout for details
j
In addition, you can utilize our Python SDK as a convenient wrapper on top of the mentioned APIs. There are methods for fetching and storing users/usergroups in YAML files and deploy them back to the platform. So you can version the definitions e.g. in git or you can generate them based on data from another system.