Skip to main content

Notifications

Announcements

No record found.

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
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Populate Email as Username in CRM Portal Registration page

    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

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Adis Profile Picture

Adis 136 Super User 2025 Season 1

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 81

#3
Jonas "Jones" Melgaard Profile Picture

Jonas "Jones" Melgaard 77 Super User 2025 Season 1

Product updates

Dynamics 365 release plans