Hi,
I started recently with building a onboarding and offboarding app for HR.
Onboarding is going well and I have a offboarding screen as well.
What I am missing now is deleting and resetting an account with PowerApps (haven't found a solution yet).
What I did is blocking a user.
It works but I want to have the live status of the value accountenabled and when I press the button I want the value to change. Somehow the account gets blocked but my variable show accountenable:true.....
I want to have the live status when you search for a user.
Sometimes when I press block user I see the little ants going and then everything works fine but sometimes I have to press the button couple times before anything happens.
I tried fixing this by adding a timer so azure has time to process it but that didn't to the trick.
I also added a label with this code:
If(Office365Users.UserProfileV2('txtusername-2'.Selected.Mail).accountEnabled,"Account not Locked","Account Locked")
That one works but only if I reload the app or search for another user first. I doesn't update in real time.
This is the screen with the code:

I am doing something wrong or is there a refresh label command I am not aware off...