Hi All,
First post, so I hope I get as clear and "compliant" as possible.
I want to build a flow or app that would search for Office 365 Users and push filtered relevant entries (users with a Name, Phone, Activated Account) to our users contacts folder. That way those contacts would sync to phone and when someone arrives to the company I'd know who is calling me. (And I'm very surprised nobody had the same idea :))
I used a template that push a Sharepoint list to User Contacts to get going, but I'm now struggling with the contact check before creating missing contacts.
Here is what my last test results:
I'd love to solve this but if you have hints or a different Flow that would allow me to get updated contact folder I'm open to it. (the searchuser query displays a max of 999 results and that's quite a small amount of results, I might need to create Service Account to get the results directly from Azure AD.
Other thing, I choose to use a button so that this flow uses current user who triggers the flow gets contacts in his own folder, not mine ๐ but does that mean I cannot trigger daily for example.
Thanks for your help.
Solved! Go to Solution.
I was able to figure out a solution, as there is a way to get contact folders filter out the contact folder name and get its specific ID as it is different for each user. So my flow does the following:
- Get the list of users contact folder
- Select the folder named "Contacts" as its the defaut everyone has in its mailbox
- Get the ID from the folder to populate the folder ID asked when doing the get-contacts, create contacts and update contacts
- Get the Azure AD group members to populate its entries within Outlook contact folder
- Lookup in the user contact folder for a Display Name matching each group member
- If the contact from group membership exist, it updates the latter, else it creates a new contact
With that I was able to share a button with some coworkers allowing them to add the company selected employee to their contacts with the click of a button (according to the fact they sync contacts with activesync).
I have a couple more things annoying me so I hope some will have hints to achieve the missing elements:
- Check for contacts created with my Flow (I can populate a field meaning my contact was created with my flow) if they are still member of the Azure AD group else it means they could have left the company and so the contact needs to be deleted
- Is there a way to bypass the limits of the get-groupmember (100 users only) - Is setting top at 999 the only solution?
And so that anyone can reuse this, here is the flow (I could share it as a template maybe if anyone is interested...)
Get Contacts Folders
Check if contacts from groups exists
Creates or Update contact
Any improvements are welcome - for example to add some recurrence to this process, but is that even possible with a button as launcher?
Hi @Flownaut ,
It seems that the Flow implementation failed because of an issue with the action in If yes branch. Please check the details of action error and make adjustments to the action configuration based on the error.
Try clicking Settings to increase the degree of parallelism of Apply to each to see if it meets expectations.
In addition to the trigger, you could use Recurrence, which automatically triggers Flow according to the set period.
Please take a try.
Best Regards,
Hi Barry,
Thank you for your reply. My issue was not the degree of parallelism, even though I didn't know about it.
I rebuilt my flow to get contacts from an AzureAD group membership and push them to my contacts and that's quite a simpler method. The aim is to provide company users a way of getting the company address book in their contacts with the simple click of a button.
If I run the flow with my credentials embedded it works great, but if I share the flow button, even specifying user must provide his credentials (as it's needed input to connect to his mailbox to populate his contacts) - The flow fails because of the contact folder which seems to be different for each user can you confirm that?
Here is the execution error I get when some other user clicks the button:
I was able to figure out a solution, as there is a way to get contact folders filter out the contact folder name and get its specific ID as it is different for each user. So my flow does the following:
- Get the list of users contact folder
- Select the folder named "Contacts" as its the defaut everyone has in its mailbox
- Get the ID from the folder to populate the folder ID asked when doing the get-contacts, create contacts and update contacts
- Get the Azure AD group members to populate its entries within Outlook contact folder
- Lookup in the user contact folder for a Display Name matching each group member
- If the contact from group membership exist, it updates the latter, else it creates a new contact
With that I was able to share a button with some coworkers allowing them to add the company selected employee to their contacts with the click of a button (according to the fact they sync contacts with activesync).
I have a couple more things annoying me so I hope some will have hints to achieve the missing elements:
- Check for contacts created with my Flow (I can populate a field meaning my contact was created with my flow) if they are still member of the Azure AD group else it means they could have left the company and so the contact needs to be deleted
- Is there a way to bypass the limits of the get-groupmember (100 users only) - Is setting top at 999 the only solution?
And so that anyone can reuse this, here is the flow (I could share it as a template maybe if anyone is interested...)
Get Contacts Folders
Check if contacts from groups exists
Creates or Update contact
Any improvements are welcome - for example to add some recurrence to this process, but is that even possible with a button as launcher?
Hi @Flownaut ! Thank you for this, I was able to replicate this without too much hassle. However, I noticed it only runs for my specific user โ I want this to automatically run for all members in my AD, so that AD contacts are automatically pushed to Outlook address books for every member of the organization. I am pretty new to Azure flow, so I don't really know what the limitations of the platform are. How have you rolled this out in your organization?
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.