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 / Authentication and con...
Power Pages
Answered

Authentication and contacts with multiple accounts

(0) ShareShare
ReportReport
Posted on by 4

Hi,

We have a scenario where a lot of contacts is connected to multiple accounts. (N:1 between account and contact). 

We do not want to have this scenario when starting with portals. We want to keep the functionality related to filtering lists, security and creating new records close to the standard functionality where a contact is only connected to one account. (the contact should choose which account he/she should work with during sign in.) 

We will use external identity provider and we consider a solution where the user sign in to the portal/external identity and decide which account to work with based on a list of available accounts for the contact (this process will be outside the portal before the user is forwarded to the portal) If a contact is connected to 3 accounts we will create 3 alternative contacts, each mapped to only one account. Based on the account that the user selects during sign in we will forward the correct alternative contact (that is mapped to only that account) to the portal. We will use a custom claim in the token to tell the portal which contact this is. So the short question is: 
Insted of authenticate the contact based on username and email can we authenticate a user based on custom claim and email? 

 

Categories:
I have the same question (0)
  • Verified answer
    OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    Hi @eh365 ,

    Unfortunately, you cannot authenticate users based on the custom claim and email. I had similar scenario and my solution was next: user on external idp selected account they want to login with. Id of that account I receive as a claim and mapping that claim to a custom text field. Then sync plugin was searched for an account in our system using provided id and then set another custom lookup field with the found account. Then I based all of the security of the portal on that field. 

  • eh365 Profile Picture
    4 on at

    Hi @OOlashyn,

    Thank you. I think we will use this method to solve this case. Based on the info from the custom claim we can update the account in the parentcustomerid field on the contact. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 52

#2
Valantis Profile Picture

Valantis 46

#3
Vish WR Profile Picture

Vish WR 29

Last 30 days Overall leaderboard