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 / SharePoint List entry ...
Power Apps
Answered

SharePoint List entry by flow and powerapps form returns error "The response is not in a JSON format. "

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a form that is supposed to capture UPN of logged in employee. The field has code

Office365Users.MyProfile().UserPrincipalName  as I want to capture the UPN of logged in user in form text field as defalut value that is not editable by user in form. 

 

This field is not editable and my intention is to show UPN that is not changeable/ editable by user, when i run the form, it shows me my name in form field and enters my name in list using flow. 

 

when some other user calls the flow it does not enter data in SharePoint list but i see their data values in flow.  the error i received in flow is: The response is not in a JSON format. "

 

 

Below are forms and flow i am using to update sharepoint List.

 

tempsnip.pngVar-Flow.PNG

Create item.PNG

Here is FLOW entry with user data 

 

tempsnip1.png

 

I just noticed that for every user the connection is my name 

 

 

tempsnip2.png

Could this be the reason of error?

 

If yes how to resolve it as to my understanding , this connection should be each users name? how to resolve this issue?

 

TIA

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Anyone please ?

     

    @CNT , @RandyHayes , @WarrenBelz , @Pstork1 

     

     

     

  • Pstork1 Profile Picture
    68,923 Most Valuable Professional on at

    If what you want is the UPN of the logged in user then I would use User().Email rather than Office365Users.myProfile().  There is no guarantee that everyone has a profile.  

    Other than that can you show us the .run line you are using on the buttons to invoke the flow?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Pstork1 Thanks for responding to the post. I tried user() it displayed user email of logged in  but user().FullName still shows the name of app creator.

    this is run line to invoke the flow. 

     

    TimeSheetManagementFlow.Run(Label7.Text,WorkDate,Time,Arrival.Text)

     

    where Label7 is User().Email

     

     

     

     

     

  • Pstork1 Profile Picture
    68,923 Most Valuable Professional on at

    How are you using User().FullName that it shows the Full name of the maker of the app?  It should pull the person running the app.  Are Workdate and Time variables?  That's probably the issue.  Because those values when passed are strings and the fields you've put them in are expecting Date Time values.  You'll probably need to cast them using FormatDateTime() in the flow.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Pstork1 I thought to redo form.

     

    i have another scenerio, I need date and time for time sheet , i am trying to have only date and time in different Labels Say Date and time where

    Date --> Text( Now(), DateTimeFormat.LongDate ) and

    time is Text(Now(), "HH:mm AM/PM")

     

    Now when i run flow it gives error Error details: 'String 'Tuesday, July 6,2021' does not validate against format 'date'.'." and flow is TestFlow.Run(Name.Text,Email.Text,Arrival.Text,Text(Date,"[$-en-US]yyyy-mm-dd"))

     

    how to resolve this issue?

  • Pstork1 Profile Picture
    68,923 Most Valuable Professional on at

    If Date is a label then you need to access the Text property of the label, not just Date.

    TestFlow.Run(Name.Text,Email.Text,Arrival.Text,Text(Date.Text,"[$-en-US]yyyy-mm-dd"))

      I would also avoid using Date as a label name since its a reserved word. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Pstork1  The date is label inface everything is label as it s only to view and  data is entered on button click. I used this but i recieve same error.

    TestFlow.Run(Name.Text,WorkTime.Text,Arrival.Text,Text(WorkDate,"[$-en-US]yyyy-MM-dd"),Email.Text)

    Sorry i am very new to PowerApps and this is my first app. I appreciate your cooperation. 

     

  • Verified answer
    Pstork1 Profile Picture
    68,923 Most Valuable Professional on at

    As I mentioned previously.  If WorkDate is a label then you are trying to use the label control as input for the Text function.  That won't work.  It needs to be WorkDate.Text.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks a lot. I really appreciate your cooperation.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Pstork1 Hope you are doing well. I need some more help in getting informaiton of logged in user  in Power automate Desktop .

     

    I want to get the information of user's  name/info ( such as full name, UPN) from window that is connected to Azure AD. Cna you help?

     

     

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!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 88

#2
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 45

Last 30 days Overall leaderboard