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 Apps / Showing Only Current U...
Power Apps
Answered

Showing Only Current User Data in Vibe Code Apps Not Working

(1) ShareShare
ReportReport
Posted on by 26
I am trying to show only Current User Data in vibe code Power Apps which i'm building in https://vibe.powerapps.com/. In canvas have we have User() function using it we can fetch user data but in vibe code app i'm not able to show the current user data. For Example if samri@abc.com using the app and his email id is there in Employee Email column then his data only shows in the app. Any help will be really appreciated. Thank you 

I have the same question (0)
  • Suggested answer
    MS.Ragavendar Profile Picture
    6,562 Super User 2026 Season 1 on at
     
    User() is a Canvas-only function. Vibe Code apps do NOT expose User() the same way. That’s why your existing approach works in Canvas but not in Vibe.
     
    The Vibe app runtime environment currently has limitations in how it exposes user context APIs. As a result, certain APIs required by the Microsoft 365 connector to retrieve user profile information are not fully supported. Microsoft has acknowledged this behavior as a known limitation of the Vibe preview experience, rather than a defect, and it is not yet available as part of General Availability (GA).
     
    ✅If this helped, please Accept as Solution to help others ❤️ A Like is appreciated 🏷️ Tag @MS.Ragavendar for follow-ups.
  • Verified answer
    11manish Profile Picture
    1,422 on at
  • Verified answer
    Valantis Profile Picture
    3,427 on at
     
    Vibe apps are built on the Power Apps Code Apps framework, not canvas apps, so the User() function is not available.
    The equivalent is the getContext() function.
    In the Vibe chat, tell the agent:
    "Filter the Timesheet Records to only show records where Employee Email matches the current signed-in user's email. Use the getContext() function to get the current user and filter by ctx.user.userPrincipalName"
     
    The agent will generate code like this:
     
    const ctx = await getContext();
    const currentUserEmail = ctx.user.userPrincipalName;
    // then filter your Timesheet records where Employee Email == currentUserEmail
     
    This is the confirmed way to get the signed-in user's email in a Vibe/Code app and use it to filter your Dataverse data.

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

     

  • SK-06111848-0 Profile Picture
    26 on at
    Thank you so much  and  for replying. I have opened the microsoft documentation shared by you and copied the info give there in chatgpt and asked it to create a prompt for me to Use the getContext() function to get the current user and used the same prompt in Vibe code AI and it worked like magic. Thank you so much for your help  
  • Valantis Profile Picture
    3,427 on at
    @SK-06111848-0 Im Happy that we were able to help. have a nice day :)

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 490

#2
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 381

Last 30 days Overall leaderboard