Is there any way to get a information on activities performed by a specific box user through box api? - box-api

Say I want to know what all operation a box user "x" has performed in last week. Is there any way to acheive this via box api??
Or for that matter given a file id can we get a list of all the activities performed.??

If you are the administrator of a Box enterprise and the user is within your enterprise, you can do one of two things:
Fetch all events in the enterprise within your timespan of interest and manually filter them to the particular user using the event.created_by.login. You can filter to a particular file using the event.source.id property.
Fetch the particular user's events using the On Behalf Of API.
Otherwise, you can only fetch events for the user represented by the Bearer token.

Related

Get drive files stats (views/openings) | Google Drive API

I've been searching the docs but I can't find anything.
The goal is to retrieve different stats from our files. Actually, we can retrieve almost everything we need, except for the document openings and document openings per user.
So here is the question: How can I retrieve document views of a drive document (a G Sheet to be more precise) ? Can I segment it by user ?
Thank you
I understand that your goals are the following one:
You want to retrieve document views
Of a particular document (and you know it's id)
Associated to a specific user
Please correct me if I get it wrong. If those are your goals, then you can use the Admin SDK as pointed out by Rubén in the comments. Now I am going to detail how you can make such a request easily.
You could use the method activities.list() to get a list with what you want. You only have to populate these four parameters:
Parameter
Value
Description
userKey
The user's email
Determine the user
applicationName
drive
Identifies the Google service
eventName
view
Designate the type of activity
filters
doc_id=={MY DOCUMENT ID HERE}
Filters by the document
That configuration will provide you with your desired data. Leave a comment below if you need help creating that request in your own environment.

Store user's state of app in mean stack application

I am using angular 9 and have forms with multiple parts.. like first section about name and personal details, second part about their primary school, third part about users past jobs, etc..
And each part has heading in a side menu.
personal details
primary school
previous job
Clicking on which user can go to that particular part of form..
The question is if the user, completes 2 parts i.e. personal details and primary school and then exits the browser.. the next time when the users logs in.. the first thing I want to display is the 3rd form i.e. previous job to the user.. so that he can continue from there..
Conversely I also want to send an mail to the user stating 'please fill the previous job details in xyz.com'
How to store this kind of data.. can it be done by angular services or need to use NgRx store as must.. if ngrx is needed.. can I somehow store the state in some form in api..
I m using Express with mysql in backend..
Ngrx store is mainly used to have consistant data in more than one component(like user name which should be same in header and profile component). for your scenario ngrx store is not needed, and one more thing, even if you want to use ngrx store when user closes data, you still have to store data in local storage or backend. so that you can use that data when user opens that page.
For your scenario use backend to store data. whenever he comes back to that page, first fetch data and fill it into fields.
Hope it helps. thank you

How can I show the logged-in user in Power Apps Portal what their form submissions are?

The setup
I have a Power Apps Portal with the following pages:
Prequalification page. This has an entity form embedded inside it. The entity form is linked to the custom entity SupplierPrequal. When the user fills in and submits that form, they are redirected to the next page.
Submission List page. This has a List embedded inside it. The list should show each of the logged-in user's form submissions.
Submission Edit page. This has an entity form embedded inside it. The entity form is linked to the same custom entity SupplierPrequal and lets them attach files to a previous submission.
The problem I am facing
On the Submission List page, it shows submissions of users other than the logged in user. Here is a screenshot. You can see that the metadata for fields like [Created By] does not identify the user who submitted the form.
I was able to autopopulate the field [00_lkp_UserSubmittingForm] with the logged in username. Unfortunately this is not a unique identifier, and is also editable by the user.
I see these potential solutions, and would appreciate your advice
Change the metadata so that instead of recording the field [Created By] as "SYSTEM", it will record the logged-in user's unique identifier. Then change the view's filtering conditions, so [Created By] equals the current user.
Change the metadata so that a new field such as [00_lkp_UserSubmittingForm] will be autopopulated with the logged-in user's unique identifier. Then change the view's filtering conditions, so that new field equals the current user.
I suspect that both these approaches will require a lookup of the [External Identity] entity's field [Username]. They will probably involve configuring the entity form's tabs "Entity Reference" and "Entity Form Metadata" in Portal Management.
What I've researched
This link describes a similar problem, although the solution is for a CRM Portal, not a Power Apps Portal.
This link addresses the issue for a Canvas App, not a Portal App
This link apparently got it working, although I am still trying to understand what I need to configure.
If I understand your problem statement you wish to filter out Entity List, in your case Submission List page based on your logged in user.
As you might now, every user in Portals is a Contact record in CRM.
If I see your createdby, modifiedby and owner fields, I believe you have some background logic which runs under System (user) and does the required.
You have 2 way to solve your issue:
Either change your background logic to run under the context of running user. This will createdby, modifiedby and owner as running user and not System.
or you create a lookup field 00_lkp_UserSubmittingForm I say lookup and not plain text field. This lookup field will have relationship with contact. So you can autofill this field (lookup) with contact as user. In this way you get unique value in your 00_lkp_UserSubmittingForm field. Because it has unique guid for each user (in turn a contact)
Now with above any method what you get is current user (unique).
Then you can follow any of the below article to solve your issue.
List item
In Entity List itself, there is one option to add Filter Condition. Please check below:
Article Ref
Or follow this article

How do i get meeting/appointmens for more than one resource (mailbox) with EWS java api?

I have general question regarding using Exchange Web Service.
I am using ews-java-api
https://github.com/OfficeDev/ews-java-api
and also tried using JEC - Java exhange connector.
http://elich11.freeshell.org/index.html
If a company have 100 to 500 rooms our goal is to get a total list of appointments/meetings for all of these rooms at once as fast as possible.
Using this api what is the best solution for this issue that uses the least time to get a total list of appointments from a list of already known room addresses.
List attendees = new ArrayList();
attendees.add("room1#domain.com");
attendees.add("room2#domain.com");
attendees.add("room4#domain.com");
attendees.add("User1#domain.com");
attendees.add("User2#domain.com");
attendees.add("Room5#domain.com");
attendees.add("Room6#domain.com");
attendees.add("room10#domain.com");
attendees.add("room11#domain.com");
attendees.add("room12#domain.com");
attendees.add("room13#domain.com");
attendees.add("room14#domain.com");
attendees.add("room15#domain.com");
attendees.add("room16#domain.com");
I tried running through a list of email adresses in an array using impersonation for each mailbox to gain acces to the meetings. I have also tried to grant delegation to each mailbox for one specific user, so i dont have to impersonate each mailbox for the user this user to get the appointments.
My problem is with the number of rooms companies can have, both of these methods i slow because the number of webservice calls increases with the amount of mailboxes.
Is there any suppported method og workaround for extracting appointments for more than one mailbox without having to perform a webservicecall for each resource (mailbox)?
It depends of the level of detail you need for each appointment. If you need the full Appointment object there is no other way you can do it. However you may want to consider running multiple concurrent queries (you need to consider throttling will affect you a some point if you push this too far).
Otherwise if you can deal with just having the Subject,Start,EndTime for appointments then GetUserAvailbility https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/getuseravailability-operation should work okay in batches of 100.

Can groups be expanded when querying which students are associated with a class notebook?

We currently query for the list of students associated with a class notebook via:
/api/v1.0/me/notes/classnotebooks/{id}/students
Should a group be associated with the class notebook then we get principalType=Group and an id in the form:
c:0o.c|federateddirectoryclaimprovider|{id}
So is it possible to expand the members of the associated group(s) within this call? If not, what is the format of this id? To use it via the graph api requires an id so is it safe to assume that the id will always be the 3rd piped element?
Thanks
I ran into this for my application as well. After conferring with the onenote team a few months ago it came down to that you cannot expand these groups inside the onenote api. You must authenticate to the graph api and use the groups functions there. The downside of this is that the graph api permissions to expand a group require an administrator to grant them. So in the end all I could do was recommend the users create class notebooks using the student email list rather than an azure group. (on your final point the format should remain consistent the third piped element is the group id you can pass the graph api)
specifically the below endpoint to get a groups members
'https://graph.microsoft.com/v1.0/myorganization/groups/' . $group_id . '/members'