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...
SpyrosM1980
Aug 26, 2022Copper Contributor
Hi Patrick,
Is the mechanism you described still functional? We tried the exact same steps through code in order to create and assign a P4TW project, using the exact steps (Create a group, create a Team with reference to the group, assign a role to a team, create the project with the team as the owner), however while the project is created successfully, along with the group and the respective teams and roles, we still don't get to see it "linked" to the newly created Group (even after several hours).
The user has to open the project and manually and link the project with the group:
We compared the rows created in the dataverse from manual assignment, to the ones auto created by our code and they are exactly the same. Are we missing any step?
Thanks
PatrickGrebe
Aug 29, 2022Copper Contributor
SpyrosM1980 Hi, the whole thing works smoothly for us as I described above. (just tested)
We create the Office365 group via LogicApp. Then we wait about 2 minutes before we create the team in Dynamics and connect it to the Office365 group. (via Azure Function)
It takes between 15-60 minutes until the connection is displayed correctly in P4W.
- SpyrosM1980Aug 30, 2022Copper Contributorjust wanted to say thanks, and followup to any one who is interested:
Indeed the key here was waiting for a couple of minutes after group creation. When we inserted a delay among these two actions, the group was linked correctly in P4TW. So to sum up, the process is:
1) Create Group in O365
2) wait for 2 minutes
3) Create a record in Teams entity with azureactivedirectoryobjectid=[group id]
4) Assign the role "Project Team Member" to the newly created Team
5) [Create the project if not exists]
6) Set the owner to the id of the newly created team
7) [wait for 15-60 minutes to see the linked group in P4TW]
To be honest, our users are frustrated especially with the last delay, if anybody knows how to force any refresh job to run let us know, because the process runs from the UI in seconds, so something different may be happening there.
Thanks again for your help - SpyrosM1980Aug 29, 2022Copper ContributorThanks. The truth is that we are currently missing the "wait 2 minutes after o365 group" creation step. Instead, we are immediately creating the team with reference to the group. We will add the first wait also and let you know if that works.
Thanks again,
Spyros