When I tried “DriveItem.LastModifiedByUser”.
with assigning it a variable of “Microsoft.Graph.User” DataType.
It throws, object reference not set to an instance of an object.
Can someone please help.
I can get the “LastModifiedDate” pretty well. But i am facing problem when i try to get the “LastModifiedByUser”
Here are the steps to fetch the “LastModifiedByUser” property:
- Install office.0365 package & Drag and drop the “SharePoint Application Scope” activity onto your workflow and provide the necessary authentication details to connect to SharePoint.
- Add a “Get File Properties” activity within the SharePoint Application Scope activity.
- In the “Get File Properties” activity, specify the SharePoint site URL and the file path of the file whose properties you want to fetch.
- Click on the “Output” property field of the activity and click on “Add Field”. Add the field “Editor”.
- Now the “Editor” field will contain the name of the user who last modified the file.
- You can store this value in a variable or use it in subsequent activities.
Regards,
Kaviyarasu N
I have used installed Microsoft 365 pacakge.
I have Use Onedrive/Sharepoint activity. Not no SharePoint Application Scope activity.
But primarily, If i am using Find Files/Folders activity and able to get LastModifiedDate details, why not LastModifiedByUser details.
Will be helpful, if somebody guide me in this.
I have assigned “new User” as a default value for this variable.
Even after assigning this, i am either getting “Object reference not set to an instance” Error. or a empty log Message.
Inform me if this is incorrect.
@Vishnu_Pradhaban , If Possible. Share the Screenshot of the flow and variables. it helps us to understand the issue.
Can you put the exact package name here?
I dont find the pacakge name that you mentioned above
@Vishnu_Pradhaban , Maybe the find Folders and Folders Returns an empty data. From properties, create the variable for the result and print the Count, before the VarResult1
Example: VarResult2.Count.tostring
If it has 0, it means it returns an empty value.
As i already said, i am able to fetch the lastmodifieddate info. I am pretty sure, this SP folder contains some files.
Heres is the screen shot, it has 2 files. and i am able to get the LastModifiedDateTime also.
But only problem is that I can’t get the LastModifiedByUser information.
Somebody please guide me.
@Vishnu_Pradhaban
Try this anyone of this
Var1.LastModifiedBy.User
Var1.LastModifiedBy.User.Tostring
Var1.LastModifiedBy.User.DisplayName
Var1.LastModifiedByUser.GivenName
Var1.LastModifiedByUser.DisplayName
Hi…
First of all thanks.
“Var1.LastModifiedBy.User.DisplayName” — this actually worked. But partially, in the sense it gives me the display name but not the Mail ID.
But its ok. By the way, any ways to get the exact mail ID of that person??
I have already tried this. This throws error.
Anyway, i was able to use invoke python code to check the mentioned user’s displayname is available in the AD group or not.
Thanks anyways
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.