Forum Discussion
elmirt
Jun 11, 2021Copper Contributor
Add Teams group to Project for the Web with Power Automate
Hello, we are looking for a solution to add a Teams group to a project in "Project for the Web" with a flow. In the web we have just to select the group and click on "Add" like in the screensh...
PatrickGrebe
Feb 28, 2022Copper Contributor
Sounds good.
We currently do it like this:
1. Create a Microsoft 365 Group (including a Microsoft Team)
2. Create a new record in the "team(s)" entity (connected to the AAD group created in step 1) (https://XXX.crm4.dynamics.com/api/data/v9.1/teams) .
3. Connect the role (https://XX.crm4.dynamics.com/api/data/v9.1/roles) "Project Team Member" to the team created in step 2.
Also see my code from the previous answer. azureactivedirectoryobjectid equals to the group id created in step 1.
We currently do it like this:
1. Create a Microsoft 365 Group (including a Microsoft Team)
2. Create a new record in the "team(s)" entity (connected to the AAD group created in step 1) (https://XXX.crm4.dynamics.com/api/data/v9.1/teams) .
3. Connect the role (https://XX.crm4.dynamics.com/api/data/v9.1/roles) "Project Team Member" to the team created in step 2.
Also see my code from the previous answer. azureactivedirectoryobjectid equals to the group id created in step 1.
PhilippS1
Jul 14, 2023Copper Contributor
Hi Patrick, I am trying to implement the whole thing in PowerAutomate.
1. first I create the team.
2. wait 2min
3. add an entry in the Dataverse table "Teams" (see second screenshot)
4. after that I create the project in the table "projects" with the TeamID as owner.
I seem to be missing the step where I add the role "Project Team Member" to the team. Unfortunately I have no idea where to find this.
Do you have a hint for me please?
Here is the error message I get:
"URL was not parsed due to an ODataUnrecognizedPathException. Resource not found for the segment provided in the URL."
I think this suggests that a relation is missing to another table? Probably owner?
- gbartumeuJul 19, 2023Copper Contributor
Hello PhilippS1,
I did it using Power Automate.
On Dataverse, the Team table will automatically add the Team you recently created. But if you want you can add it by yourself.
Then you will need to relate this Team with Team roles associations: Project Team Memeber and Project Common.
Here is how I have done it using a "Relate Action" (In Spanish..):
1. Table name: Teams
2. Row Id: Your Team Id
3. Relate: Team Role Associaton table
4. Relate with: https://[Your dynamics URL]/api/data/v9.1/roles(ROLE ID), where the role ID you should copy it from your "Team Roles" Dataverse table.
Hope it helps!!
- PhilippS1Aug 01, 2023Copper ContributorIt is really uncomfortable for me to ask, but I just can't get on here by myself and would be very happy about further help 🙂
- ankitjanaOct 11, 2023Copper Contributor
PhilippS1 Were you able to solve this?
I am trying to achieve the same but I am not able to assign the owner when I am creating the Project using the 'Add a new row' action.
I am getting the following error
Principal with id xx-xx-xx-xx-xx does not have CreateAccess right(s) for record with id 00000000-0000-0000-0000-000000000000 of entity msdyn_project.
Thanks!
- PhilippS1Jul 19, 2023Copper Contributor
Thank you very much for your help! I appreciate it!
Unfortunately I have no success. For me it does not create a row in the dataverse table "Table" after the creation of the team.
I have then set the entry once manually, unfortunately without success. Here once my flow:In the actions that are used to relate the role, I used the team ID that I got from the action before. Not the team ID, which I received in the first action.
If it is not too much effort for you and you find time, could you show me your whole flow? I can understand if it is too much work though.
- PatrickGrebeJul 18, 2023Copper Contributor
PhilippS1Hello, we have never tried it via Power Automate, so I cannot assist you further here. Unfortunately, I don't have the time to reproduce the whole thing. Perhaps an Unbound Action might help in this case.