Is there a way to by default run as different user (NOT elevated)?

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
kdwisdom
Posts: 25
Last visit: Fri Jan 26, 2024 10:39 am

Is there a way to by default run as different user (NOT elevated)?

Post by kdwisdom »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product: PowerShell Studio 2021 (64 Bit)
Build: v5.8.187
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.18363.0

*** Please add details and screenshots as needed below. ***

I've read some past support questions related to this over the years and saw some things about a default manifest (I tried that to an extent but had no luck).

We have a (somewhat) unique situation here. Up until this January we had on-prem Exchange which we would connect to with our elevated/admin accounts with PowerShell and everything ran beautifully. I had it embed the elevated manifest and it worked great.

Then our agency upgraded to a hybrid Exchange (on-prem and O365 hybrid).

Now - to connect, we have to use the command Connect-ExchangeOnline -UserPrincipalName me@me.com....

That all works fine, however, if we run it as admin, it doesn't work because of some Azure/O365 things out of our control.

It runs fine when we run it as a different user though.

What I want is to just be able to run the EXE of my application and have it automatically ask for credentials so I can run it is a different user but not in elevated mode.

Has anyone been able to get it to do this? It doesn't put me out too much to shift+right click, run as different user, but I share this app with team members and it would be a lot easier for them to have it just prompt for them to do this so they are using the correct account from the get go.

Appreciate any help, thanks,

Kyle
User avatar
Alexander Riedel
Posts: 8472
Last visit: Mon Mar 18, 2024 2:59 pm
Answers: 19
Been upvoted: 37 times

Re: Is there a way to by default run as different user (NOT elevated)?

Post by Alexander Riedel »

Alexander Riedel
SAPIEN Technologies, Inc.
kdwisdom
Posts: 25
Last visit: Fri Jan 26, 2024 10:39 am

Re: Is there a way to by default run as different user (NOT elevated)?

Post by kdwisdom »

Thanks - I've done that before. I was hoping to package the executable in a way that would do it without any required manual intervention on a user by user basis.
User avatar
Alexander Riedel
Posts: 8472
Last visit: Mon Mar 18, 2024 2:59 pm
Answers: 19
Been upvoted: 37 times

Re: Is there a way to by default run as different user (NOT elevated)?

Post by Alexander Riedel »

Create a starter app that prompts and then run the main process as required. Or create the shortcut on install.
Without knowing more about your getup it's a bit hard to tell.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8472
Last visit: Mon Mar 18, 2024 2:59 pm
Answers: 19
Been upvoted: 37 times

Re: Is there a way to by default run as different user (NOT elevated)?

Post by Alexander Riedel »

You can also package using RunAs. That does not imply admin.
2021-04-13_10-31-53.png
2021-04-13_10-31-53.png (18.48 KiB) Viewed 5561 times
Alexander Riedel
SAPIEN Technologies, Inc.
kdwisdom
Posts: 25
Last visit: Fri Jan 26, 2024 10:39 am

Re: Is there a way to by default run as different user (NOT elevated)?

Post by kdwisdom »

Thanks - Yeah, I'm considering a "launcher" of sorts, was just hoping not to have to change too much about how it is currently.

I've tried the "RunAs" (and just did again) and it doesn't prompt for credentials - that's what I need. It just launches. My guess is that RunAs only works if you enter specific credentials. I need it to prompt because multiple people use it and it needs to be their elevated accounts.

Thanks,

Kyle
This topic is 2 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.