cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Flownaut
Level: Powered On

Push Office 365 users to Outlook Adress Book

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 Smiley Happy)

 

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.

 

flow.jpg

Here is what my last test results:

 

flowerror.jpg

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 Smiley Sad but does that mean I cannot trigger daily for example.

 

Thanks for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Flownaut
Level: Powered On

Re: Push Office 365 users to Outlook Adress Book

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...)

 

flow v2.jpgGet Contacts Foldersflow v2-1.jpgCheck if contacts from groups existsflow v2-2.jpgCreates 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?

3 REPLIES 3
Community Support Team
Community Support Team

Re: Push Office 365 users to Outlook Adress Book

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.

56.PNG57.PNG

In addition to the trigger, you could use Recurrence, which automatically triggers Flow according to the set period.

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Flownaut
Level: Powered On

Re: Push Office 365 users to Outlook Adress Book

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:

 

{
"status": 404,
"message": "The specified object was not found in the store., The process failed to get the correct properties.\r\nclientRequestId: b44803af-0bc8-47a2-b69a-a01a3169aa99\r\nserviceRequestId: 49455a11-3508-401d-aa56-192c0d8a2b0c",
"source": "office365-ne.azconn-ne.p.azurewebsites.net"
}
 
As if it was looking in my contact folder id. Can you confirm this is the problem? Maybe you can provide some hint...
 
Thanks a lot for the help.
Flownaut
Level: Powered On

Re: Push Office 365 users to Outlook Adress Book

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...)

 

flow v2.jpgGet Contacts Foldersflow v2-1.jpgCheck if contacts from groups existsflow v2-2.jpgCreates 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?

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 507 members 4,554 guests
Recent signins:
Please welcome our newest community members: