cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dreavisPH
Regular Visitor

Automatically ceate emails for users with the same name

Hi,

 

When we hire someone there information automatically populates in an excel sheet. I designed a flow that automatically creates the users email account in Azure AD. The problem comes when two users have similar names. Example Jason Smith and John Smith would both end up being jsmith@ and cause an error. How do I fix that?

1 ACCEPTED SOLUTION

Accepted Solutions
fchopo
Super User II
Super User II

Hello @dreavisPH 

In your excel file you could have 3 columns: Name, Primary Email, Secondary Email and do the following:

1) Get User in Azure AD with Primary ID

2) If the user is not found, it will throw an error, so you capture it and create the user with its Primary Email address.

3) If a user is found with the same Primary Email address, create the user with its secondary email address:

primary_email.png

 

To capture the error in the "Create User - Primary email" you should do the following:

01_runafter.png

 02_runafter.png

 

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

2 REPLIES 2
fchopo
Super User II
Super User II

Hello @dreavisPH 

In your excel file you could have 3 columns: Name, Primary Email, Secondary Email and do the following:

1) Get User in Azure AD with Primary ID

2) If the user is not found, it will throw an error, so you capture it and create the user with its Primary Email address.

3) If a user is found with the same Primary Email address, create the user with its secondary email address:

primary_email.png

 

To capture the error in the "Create User - Primary email" you should do the following:

01_runafter.png

 02_runafter.png

 

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

This worked perfectly! Thank you!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,846)