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 / Using Azure B2C for ex...
Power Pages
Unanswered

Using Azure B2C for external users, when creating a new record using a form, it is being submitted by System instead of User

(0) ShareShare
ReportReport
Posted on by 34

When a users creates a record using a form (Manufacturers in my example), the CreatedBy field of the record in DataVerse table needs to show the Portal user, instead is says System. All the users for this site I am building are authenticated using Azure B2C and I really need to have that information.

 

This is really basic and I cannot get around it. I did try to get to the information of the logged in user with Javascript and it does not work. var userId = Xrm.Utility.getGlobalContext().userSettings.userId; will trigger an error saying Xrm is undefined. I did try to use the form additional setting feature "Associate Current Portal User on Insert ", this does not work as well. How do I get this to work? Thank you for your help. I do not have any Dynamics 365 app instance created for this portal, I do not need it for this project, only DataVerse.

 

My only workaround for now and it's pretty ugly is to use Liquid to define hidden fields on the footer or header snippet of the page and access them using JavaScript after. Then created a new field for CreatedBy and UpdatedBy and put these values there. I only use Azure B2C, no other method, all users need to be authenticated. Reproducing the basic functionality that already exists in this way is very time consuming. I hope it is a setting I might have overlooked.

 

Thank you for your input.

Categories:
I have the same question (0)

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Valantis Profile Picture

Valantis 37

#2
sannavajjala87 Profile Picture

sannavajjala87 36 Super User 2026 Season 1

#3
Fubar Profile Picture

Fubar 23 Super User 2026 Season 1

Last 30 days Overall leaderboard