web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Network Unauthorized 4...
Power Apps
Unanswered

Network Unauthorized 401 Error

(0) ShareShare
ReportReport
Posted on by 87

Hi,

 

I have an app which has been working properly for more than 1 year. However, a couple of weeks ago I receive report from some users that they are not able to see the content/information in the app. They have access in both PowerApps and the data source (Sharepoints, including all the lists the users needed).

The users managed to open some pages, but when it is landed to page with table/information, it is empty. This case is random for some users, other users have no issue. 

 

I ran a debug session monitor with the effected user and seems this issue is related to Network/Connection?

Most of the effected users have the same debug error result as follow.

 

HeihoSilver_0-1647952424692.png

 

The Sharepoint (SP) list "Context" has 401 error which shows unauthorized even though users have access to the SP list.

Furthermore, the "Context" list has also been used in another process and shows success with code 200 below.

So it's a little bit strange with the authorization since all users have access to the apps and SP list. And again other users have no issue, just some random users. I strongly believe there is no issue with code behind GalContext - Items.

 

HeihoSilver_1-1647952758995.png

 

Sometimes I also got this issue even though I'm the developer.

I look the Details in the debug report. The error message found in the last line is showing either:

 

"error": {

 "code": 401,

 "source": "europe-001.azure-apim.net",

 "clientRequestId": "ffc2c193-7140-4363-979e-8adb81a5a139",

 "message": "The response is not in a JSON format.",

 "innerError": "Cannot read server response."

 }

 

 

or in some error case it shows below. 

 

 

"body": {

 "error_description": "Invalid JWT token. The token is expired."

 

 

Also received an error message from the user while operating the apps like this.

HeihoSilver_2-1647953485198.png

"One or more of your connections are possibly not approved. Click here to fix it"

But when she click it, there is nothing happen. 

 

For me I don't see any issue with the access to the Apps or SP but rather Network/Connection.

Could you please help me troubleshoot and fix this issue?

Again this apps never have any issue for more than 1 year. Just recently came.

 

Thanks and regards,

HeihoSilver

 

Categories:
I have the same question (0)
  • adasilva Profile Picture
    41 on at

    I'm having this exact same issue. Did you have any updates on this?

  • HeihoSilver Profile Picture
    87 on at

    @adasilva I updated the code inside the Control (gallery Items), and it works fine again after some testing. 

     

    The gallery is to fetch data based on the filtered index. So I used this code "FirstN, LastN with Filters" which produced error above, and updated the code by using "In"

     

    Below is the example of code that produced the above authorization error:

     

    Filter(Sort(Context, ProjectName, Ascending), 
     Or(
     First(LastN(_SEApp.UserProject, 1)).UserProject) And First(LastN(_SEApp.UserSub, 1)).UserSub), 
    	First(LastN(_SEApp.UserProject, 2)).UserProject) And First(LastN(_SEApp.UserSub, 2)).UserSub), 
    		...
    ...
    ...

     

    And here is the code that fix it. _SEApp is the ClearCollect that has been filtered. 

    Filter(Sort(Context, ProjectName, Ascending), ID in _SEApp.ContextID) 

     

  • adasilva Profile Picture
    41 on at

    @HeihoSilver  thank you for the reply. There is also another thing that might have helped, I opened a ticket with Microsoft and they said that multiple users were experiencing similar issues. The ticket was escalated and Microsoft ended up running a patch on April 1st that they said would resolved this. Since they ran the patch, I never had this issue reported to me again (is is close to a month now and we had this issue reported every 2-3 days). I'm just passing this information as I think it might have helped you as well. From my understanding it started happening due to a backend update from Microsoft and the patch fixed it.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard