How to make cloud flow dataverse connection act as / impersonate the canvas app user that triggered the flow? - power-automate

What I did, as user A:
New Powerapps environment with dataverse DB, within the new environment...
New solution, within the new solution...
New Dataverse table
New Canvas App with a button wired to...
New Cloud Flow, creation triggered from within the canvas app editor. Cloud flow uses PowerApps (V2) trigger and has only one dataverse Add a new row action, which inserts a record into the table created above
Published the entire solution (still same env)
Successfully tested if I could insert through the canvas app's button, which in turn only calls the cloud flow.
Shared the app with user B
Ran the canvas app as user B, hit the same button:
Cloud flow runs successfully
New record is properly inserted
However, the record's created by columns shows User A (instead of user B).
I would need User B to show as record creator.
Is my expectation wrong and this is just not possible with Powerapp triggered cloud flows, or am I missing something?
Also, I found this encouraging post, but it didn't provide any specific solution that Ii could apply.

Related

Unable to change display name on OAuth consent screen

I have developed an app that synchronises our users' Google contacts with the School's database. When I submitted the consent screen for verification I was asked to change the display name, as it violated branding policies by including GMail in the title. However when I try to update the consent screen in the API Console, after changing the app name the Save button remains greyed out, so I can't change it. How do proceed now?
Note the app is currently in use with an unverified consent screen, but new users are now unable to sign up since Google appear to have tightened their policies.
Also the app is only used by members of our organisation, so it should really be an internal app. However the Make Internal link is deactivated, apparently because I am not a G Suite User. However we have a G Suite for Education account, so does this not make me a G Suite user?
As no-one has provided a solution it looks like there is none. Therefore I’ve resorted to my plan B, which is to create a new API Project and consent screen, This time I created it as an internal project, which avoids any complications of validation. The previous project was created public as it was envisaged that parents with private Gmail accounts might also use it. However with the constraints of GDPR it has been decided to restrict it to employees only. Fortunately I have found a way for existing users to continue using the old version, while new users have to register using the new consent screen.
It appears that the message about not being able to change to a local project if you’re not a G Suite user is a red herring. I suspect you just can’t change project type once it’s in use, because of the possible implications for existing users,

How can I Create Geo Log Entity for every login in of the User (systemuser)?

I want to create a record of Geo Log entity for every login of the user in CRM. So, I want to take the IP Address, Browser, Operation system, Longitude, Latitude, ect. for every login of the user in the system. I want to do this in the Server side, but I am facing problems for creating a plugin for triggering the event of login of the user.
Like Zach mentioned, all these client side telemetry can be collected in JavaScript & created as a record in CRM entity using web api.
There’s no supported solution to inject the script in all forms when we don’t know where users are landing (after ADFS challenge/SSO user will land in their workspace tab based on their personal preference).
The trick is to force every user to land in a particular dashboard or entity view, adding JavaScript to any of the Ribbon button “Enable rule” to trigger & execute the snippet. You can use form load script on entity form or Application Ribbon (always visible button) too.
Server side - never mind. For your satisfaction you can do a custom Action to create data in entity & data can be passed from JavaScript to that custom Action as parameters.

CakePHP 3 - Event on Model->link(...)

I am working on an application management panel, with Users and Apps. I would like to log the changes (add / edit / delete) to both Apps and Users. This I realised using a custom Behavior, using the afterSave() and afterDelete() callbacks.
Note that Apps hasMany Users and Users hasMany Apps, with a apps_users join table. I created models for Apps and Users.
However, I would also like to log the links between Apps and Users (the permissions). When permissions are given, a link between a user and an app is created using Apps->Users->link($app, [$user]).
Question: How to attach an callback to a $...->link(...) call?
As far as I can tell there is not regular callback for it, like there is for save() and delete()
Browsing my own questions when I noticed this.
The solution would be to create table objects for the link table and add afterSave and afterDelete events for those tables. A behaviour could be created that is attached to those link table objects to reuse the logic.

Laravel App Demo

Does anyone has any experience in next task:
I have ready project with some functionallity (some CRUD and payment functions)
I need to make something like demo mode. Where user can create records and make payments (always successfull, without taking charge), but it should not be recorded to database.
All entered data should be available only for this user and be live only fo
My question is how to make it without making copy of the controllers for fake actions?
I have try to look in to database driver that works with session as storage but have not found anything about it.

Mixpanel not able to identify users using "alias" or "identify"

I an developing a chrome extension which doesn't has any sign up or sign in flow, instead depends on authentication of a separate web app. I started integrating mixpanel and tracking user events anonymously, Now i want to identify those anonymous users using "alias" and "identify" api. I have a user_id for identifying users from the web app exposed REST api. Now if i apply a boolean check and make sure i call mixpanel "alias(user_id)" once and call "identify(user_id)" every time user visits a page, I can see a user entry in explore tab of mixpanel but live events tab has a anonymous user with same user_id and its tracked data, I wish to link such anonymous users with appropriate user profiles.
Please help me with this if you have some understanding of mixpanel. I am new at this.
Since I didn't had a sign in or sign up flow, I cannot use
mixpanel.alias
Hence i am now calling
mixpanel.identify
As soon as user installs the plugin, Since "identify" api can be called any number of times for an user, We are able to track all future events as soon as plugin gets installed.
This way by not letting the user generate anonymous events we can handle such situation.

Resources