cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

GetOffice365Users strange issue

In my app I am using the GetOffice365Users to obtain manager information.    I am getting both the display name and the email.

 

GetOffice365Users.png

 

The ID parameter is the same for both statements, but it's giving me this error on one.    What is even odder is that it is retrieving the information successfully for both.

 

Any ideas?



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
1 ACCEPTED SOLUTION

Accepted Solutions
PowerAddict
Super User II
Super User II

@JR-BejeweledOne so the issue is that since ComboboxEmployeeInfo.Selected.Mail can be blank, it throws an error which is more like a warning, that the function has an invalid value for parameter 'id'. All you need to do is this: 

Set(varManagerDN, If(!IsBlank(ComboboxEmployeeInfo.Selected.Mail), Office365Users.ManagerV2(ComboboxEmployeeInfo.Selected.Mail).displayName));

Set(varManagerEmail, If(!IsBlank(ComboboxEmployeeInfo.Selected.Mail), Office365Users.ManagerV2(ComboboxEmployeeInfo.Selected.Mail).mail));

Set(varManagerTitle, If(!IsBlank(ComboboxEmployeeInfo.Selected.Mail), Office365Users.ManagerV2(ComboboxEmployeeInfo.Selected.Mail).jobTitle));

Let me know if this works. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

View solution in original post

1 REPLY 1
PowerAddict
Super User II
Super User II

@JR-BejeweledOne so the issue is that since ComboboxEmployeeInfo.Selected.Mail can be blank, it throws an error which is more like a warning, that the function has an invalid value for parameter 'id'. All you need to do is this: 

Set(varManagerDN, If(!IsBlank(ComboboxEmployeeInfo.Selected.Mail), Office365Users.ManagerV2(ComboboxEmployeeInfo.Selected.Mail).displayName));

Set(varManagerEmail, If(!IsBlank(ComboboxEmployeeInfo.Selected.Mail), Office365Users.ManagerV2(ComboboxEmployeeInfo.Selected.Mail).mail));

Set(varManagerTitle, If(!IsBlank(ComboboxEmployeeInfo.Selected.Mail), Office365Users.ManagerV2(ComboboxEmployeeInfo.Selected.Mail).jobTitle));

Let me know if this works. 

 

---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions. 

 

Thanks!

Hardit Bhatia

Microsoft Business Applications MVP

Microsoft Certified Trainer MCT

Blog | Twitter | LinkedIn | Facebook | YouTube  |  Email

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (66,223)