cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

Auth error and O365Users.DirectManagerV2 error

Hey gang... I couple oddities for your assistance this morning.

 

1.  I have an app which runs perfectly under Chrome, runs but did throw an error once in IE (more about that in #2), but will not run under Edge.  I have tried both running from the web link directly as well as simply choosing Play from make.powerapps.com and both get an autherror. It just cycles between the color of my loading screen without the icon (running apps.powerapps.com/play/....) and a blank white screen running (apps.powerapps.com/auth/....) before finally dying and giving me https://apps.powerapps.com/play/autherror ("Sorry there's been a disconnect").  Is this an environment problem?  And if so, any hints on what I need to get the Admin to change?

 

2.  In IE11, the  very first time I attempted to run the same app, it got an error from O365Users.DirectManagerV2.  Since that first failure it has worked correctly every time with no error.  Another first time user reported the same behavior.  What might be causing a first time failure like this?  I don't want to have to tell all 5000+ users they will get an error the first time and then everything will be OK.  😞 

 

Here's the statement, which runs as part of the On Visible action during the opening of the first screen.  CurrentUserEmail is set during the OnStart for the app.  

ClearCollect(DirectReports,Office365Users.DirectReportsV2(CurrentUserEmail).value); 


DMError.png

Insights appreciated.  I have a meeting with the IT folks in about an hour and if there are changes I need to get them to make, it would be great to know before the call.

 

Thanks,

LRVinNC

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Dual Super User II
Dual Super User II

Re: Auth error and O365Users.DirectManagerV2 error

Hi @LRVinNC 

 

If(!IsBlank(User().Email),ClearCollect(DirectReports,Office365Users.DirectReportsV2(User().Email).value) )

 

will work and set the collection up

 

So looks like when we set data in a variable, PA probably takes some time to load the data in and in the meanwhile the Onvisible fires and since that variable is still populating it is empty and hence the error

 

so for the OnVisible just use

If(!IsBlank(User().Email),ClearCollect(DirectReports,Office365Users.DirectReportsV2(User().Email).value) )

and your issue will be solved

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

Highlighted
Dual Super User II
Dual Super User II

Re: Auth error and O365Users.DirectManagerV2 error

Hi @LRVinNC 

 

for IE ensure

 

"https://login.microsoftonline.com", "https://create.powerapps.com", and "https://*.create.powerapps.comare in the security zone

 

also add

 "https://make.powerapps.com", and "https://*.make.powerapps.com

 

This worked for me in IE

View solution in original post

16 REPLIES 16
Highlighted
Dual Super User II
Dual Super User II

Re: Auth error and O365Users.DirectManagerV2 error

Hi @LRVinNC 

 

CurrentUserEmail - when are you setting this?

Is this being run in Concurrent with the DirectReports collection?

 

Highlighted
Super User
Super User

Re: Auth error and O365Users.DirectManagerV2 error

CurrentUserEmail is set as the VERY first statement in the OnStart and is not part of a Concurrent statement.

Set(CurrentUserEmail,User().Email);

The query to DirectManager is in the OnVisible for the opening screen and also not part of a Concurrent sttement.

Since the OnStart is supposed to be executed before the OnVisible of the screen begins to execute, there *should* not  be a timing issue and random order can't be an issue because they aren't in a Concurrent.

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Highlighted
Dual Super User II
Dual Super User II

Re: Auth error and O365Users.DirectManagerV2 error

@LRVinNC 

 

Just tested this

exactly same issue for me

now checking ....

Highlighted
Dual Super User II
Dual Super User II

Re: Auth error and O365Users.DirectManagerV2 error

Hi @LRVinNC 

 

Looks like some timing issue

 

If(!IsBlank(CurrentUserEmail),ClearCollect(DirectReports,Office365Users.DirectReportsV2(CurrentUserEmail).value) )

 

on onvsible and it worked 

 

can u try this

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Highlighted
Dual Super User II
Dual Super User II

Re: Auth error and O365Users.DirectManagerV2 error

Hi @LRVinNC 

 

If(!IsBlank(User().Email),ClearCollect(DirectReports,Office365Users.DirectReportsV2(User().Email).value) )

 

will work and set the collection up

 

So looks like when we set data in a variable, PA probably takes some time to load the data in and in the meanwhile the Onvisible fires and since that variable is still populating it is empty and hence the error

 

so for the OnVisible just use

If(!IsBlank(User().Email),ClearCollect(DirectReports,Office365Users.DirectReportsV2(User().Email).value) )

and your issue will be solved

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

Highlighted
Super User
Super User

Re: Auth error and O365Users.DirectManagerV2 error

@RezaDorrani  Thanks. Actually didn't mean to accept that yet as the solution, although it makes sense as the solution to #2.  I was reaching for the reply button and missed. 🙂

 

Did this fix #1 or #2 for you?  It did not fix #1 for me.  Any further thoughts there?

Unfortunately,  I can't test #2 because after the first failure, it has never failed again for me, odd as that may sound.   I will have to find another user who has never accessed the app and have them try it for me on IE11.

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Highlighted
Dual Super User II
Dual Super User II

Re: Auth error and O365Users.DirectManagerV2 error

@LRVinNC 

 

for #1 I will have to see if I can reproduce this error at my end

So far I have had no such issues

 

In IE or edge can you try and run the test in incognito mode

Highlighted
Dual Super User II
Dual Super User II

Re: Auth error and O365Users.DirectManagerV2 error

Hi @LRVinNC 

 

for solution to #1

check this

It has to do with IE security settings

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/Unable-to-create-new-app/td-p/28030

Highlighted
Super User
Super User

Re: Auth error and O365Users.DirectManagerV2 error

InPrivate browsing in Edge does not resolve problem #1.  But I just tried another app under Edge and it fails too so it seems to be an issue with Edge and PowerApps playing nice together.  Ever heard of anything like that?

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,439)