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 / validate user contact ...
Power Pages
Unanswered

validate user contact power portal

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

hi

I am using the dataverse power portal. I have connected it to azure b2c. I only want users who are already contacts and have an account in crm to be able to register to use the portal. so if they don't have an account they should not be saved in azure b2c. at the moment out the box only emails are checked. how could I do this? 

Categories:
  • Christian Leverenz Profile Picture
    1,214 on at

    Hi @Anonymous ,

    this is a clumsy one 🙂

    When you use b2c for signing up, the users first create an account in azure b2c and the user (contact) in portal would then be created with the external id gathered from the b2c. Then its too late 🙂 (and it may be does not work, when the email is already present)

     

    If i were to do it, i would do it the other way round: use your contacts which are planned for portal users to create azure b2c user (there is an api, i tried it once with powershell). Then assign an external identity to the contact which refers to the azure b2c directory. 

    There are a bunch of attributes to be set like userid, securitytoken, log in enabled and things like that.

    Additionally disable accountcreation in your portal.

    Of course, you now have to let the users know, that they have a userid in your b2c 🙂

     

    Another idea would be, to invite users to the portal. I am not sure, whether it works: when you disable local accounts and allow azure b2c the users should cerate an account in the b2c directory and then they know 🙂 . But as i said: i do not know, whether redeeming invitations to the portal also work with only b2c set up with prior to the invitation no b2c account is there. No idea, would have to look by myself 🙂 .

     

    So, may be one of these two idea help you to sort out what to do. Is case of questions just feel free to ask 🙂

     

    Have fun,

      Christian

  • philseim3 Profile Picture
    8 on at

    Thank you for the response. The issue is they have too many users in the portal and don't want to migrate all of them to Azure B2C. They have legacy clients and only want those who decide to use the portal to migrate across. 

    Perhaps I might be able to allow them to create and then remove them. Would it be possible to please share that code you used in powershell to test it? Also how did the passwords get created when they were migrated initially.

  • philseim3 Profile Picture
    8 on at

    We got it working with an API. 

    We created an Azure function. The API we used was from this documentation: Git hub sample

    Then created a power automate flow where we used the JSON payload to get the credentials we were looking for. 

    The flow then sent back a response to the API and depending on that response we either sent the user to the portal or sent them to an error page.

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 117

#2
Mohsin Ali Profile Picture

Mohsin Ali 37

#3
11manish Profile Picture

11manish 21 Super User 2026 Season 2

Last 30 days Overall leaderboard