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 form fields on...
Power Apps
Unanswered

Showing form fields only when person viewing is a Supervisor, and is in Supervisor Email People and Groups SharePoint form field

(0) ShareShare
ReportReport
Posted on by 516

Currently this is working

ThisItem.'Supervisor Email'.Email = UserEmail

When the Supervisor form field has the email address of the supervisor matching the end user. with the Supervisor form field. They can see the form fields. Non-0365 user. Ad account

 

However, some of our users are now in 0365, and they cannot see the form fields for the supervisors.

 

I believe that this is the code for 0365 

Office365Users.UserProfile(User().Email).Supervisor

Not sure if the above code is correct...

 

how do I get the 0365 and AD Supervisors to see the supervisor form fields?

 

Categories:
I have the same question (0)
  • narayan225 Profile Picture
    2,547 Moderator on at

    @SPS-DEV-22 

     

    You can get manager userPrincipalName using the below formula for a current user. Manager table doesn't contain email address per se.

    Office365Users.ManagerV2(User().Email).userPrincipalName

    Hope this helps.

     

    Cheers!

  • SPS-DEV-22 Profile Picture
    516 on at

    Yes, I saw our Tables, mine had the email address of user and my supervisors.

     

    this works for AD members when the code is in the visible property.
    SharePointIntegration.Selected.'Supervisor Email'.Email=CurrentUser.Email

     

    and I need the equivalent for 0365.

     

    IS this the correct code if a current user is a member of 0365?
    Office365Users.UserProfile(User().Email).Supervisor

    is this how I would place both items (Assuming that the above 0365 code is correct)

    SharePointIntegration.Selected.'Supervisor Email'.Email=CurrentUser.Email &  Office365Users.UserProfile(User().Email).Supervisor

     

    is this how I would get the code in the visible property?

     

  • narayan225 Profile Picture
    2,547 Moderator on at

    @SPS-DEV-22 

     

    There is no property called Supervisor in Office 365. There is Manager and Direct Reports. Not sure what you want to get from office 365. Below is the official Office 365 Users connector. It shows all the things you can do with the connector.

    https://learn.microsoft.com/en-us/connectors/office365users/

     

    Cheers!

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

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,045

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 592

Last 30 days Overall leaderboard