web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Identify and choose a ...
Power Pages
Unanswered

Identify and choose a contact with external authentication

(0) ShareShare
ReportReport
Posted on by 2

I have a scenario where the CRM security model is a segregated by business units. Each BU has there own subset of contacts and as a result the database could contain contact records with the same email

address. The issue arises when trying to authenticate these users on a Power Pages site, as each of the programmes these business units serve share a single site, with web roles determining which areas of the site the users can access. 


What I would like to achieve is the ability to intercept the response from the external authentication provider and use the role in the response from the EAP to identify which of the duplicate contacts should be a registered with their specific web role. 

I’m struggling to figure out how to do this or even identify if this is possible. The default behaviour is for the most recently created contact record with the matching email address to be registered, which almost always results in this being the incorrect contact to register for that service.

 

One idea was to create a custom Azure B2C app and connect the external identity provider through this app, then see if I can do anything in this flow with regards to identifying the correct contact before the response is sent back to Power Pages. I haven’t looked into this method in detail, so I was wondering if this would be a potential solution or if the is another solution out there which would meet my requirement? 

Categories:
  • Lucas001 Profile Picture
    2,595 Super User 2026 Season 1 on at

    Hi @smuk90,

     

    when I understand you correctly,the users are in different BUs and you want to give them access to the info on your page depending on the BU they are assigned to, correct?

     

    As you already stated yourself create come webroles and once a user sign's in for the first time or a BU is assigned use a flow and relate the webrole to that contact. 

    In the end create a page which can only be seen or accessed when the webrole is assigned. You can chekc that with Liquid and a condition.



    --------------------------------------------------------------------------------------

    Hope that helps.

    If the post solves your problem, please mark it as solution. If it helps, consider a thumbs up.

     

  • smuk90 Profile Picture
    2 on at

    Hi @Lucas001 

    The issue is around external authentication and being able to choose which contact to register for the portal where there are multiple contacts identified with the same email address. The business unit explanation was for context as to why there are “duplicate” contacts. The default behaviour on registration using an external login provider is to pick the most recently created database contact with that email address, regardless of business unit, so I need to be able to perform custom checks as part of the external authentication process then choose which contact should be registered for the portal. After registration is too late because the default authentication process has already chosen a contact to register for the portal 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Pages

#1
M Bilal Khan Profile Picture

M Bilal Khan 99

#2
Mohsin Ali Profile Picture

Mohsin Ali 37

#3
11manish Profile Picture

11manish 21 Super User 2026 Season 2

Last 30 days Overall leaderboard