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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Populate Email as Username in CRM Portal Registration page

(0) ShareShare
ReportReport
Posted on by 50

Hi,

I am trying to populate user's email (read only) as username in the portal registration page. I tried the HTML code

<script>
$(document).ready(function () {
var email = $('#ContentContainer_MainContent_MainContent_EmailTextBox').val();
$('#ContentContainer_MainContent_MainContent_UsernameTextBox').val(email);
$("#ContentContainer_MainContent_MainContent_UsernameTextBox").attr('readonly', 'readonly');
$("#ContentContainer_MainContent_MainContent_ShowEmail").hide();

});

</script>
but it's not working.
Am I doing anything wrong?
Thanks
I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Partner,

    Are you trying to auto-populate the username field with email value when you register in the portal?

    pastedimage1659681983082v1.png

    To enable or disables an email address field instead of a username field. Add following line in the Portal Settings and set the value to true.

    Authentication/Registration/LocalLoginByEmail

    https://docs.microsoft.com/en-us/power-apps/maker/portals/configure/set-authentication-identity#enable-aspnet-identity-authentication 

    Dynamics 365 Portals - Force email as username - FlexRM

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
iampranjal Profile Picture

iampranjal 67

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 37 Super User 2025 Season 2

#3
Pallavi Phade Profile Picture

Pallavi Phade 24

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans