-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote Exchange Connections #27
Comments
How are you storing the credentials so they're accessible by the IIS RunAs account? |
The credentials are in a file that the application pool user has access to. The failure isn't coming at reading the file. Its coming at the connection. |
How are the credentials stored in the file? Clear text or using ConvertFrom-SecureString. ConvertFrom-SecureString generates a string that can only be decrypted by the same user on the same machine. You would have to log in as the RunAs account to do it that way. What I've done in the past is store credentials using the localmachine account. This article has instructions how, you just replace "CurrentUser" with "LocalMachine". It's certainly not best practice, but it's worked for me. |
In the very not recommended category... the password is in plain text. The code looks like: |
Sorry for the delay in getting back to you. Have you confirmed that get-content is actually reading the file? It may still be a permissions issue on the file itself. |
Did you get anywhere with the Exchangev2 cmdlets? i was able to get authentication working using the Certificate based auth with a cert in my gMSA cert store using the preview cmdlets (as noted here: https://techcommunity.microsoft.com/t5/exchange-team-blog/modern-auth-and-unattended-scripts-in-exchange-online-powershell/ba-p/1497387 The connect itself works fine, but none of the cmdlets work in WebJea. I get this response.
The same cmdlets work fine in a psexec session running under the gMSA account. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Marking as a bug for the moment so that stalebot doesn't kill it. I haven't had much opportunity to look into this. |
I haven't looked at this for a while, we did a workaround. its not pretty, but for those who may need these cmdlets in Webjea at this time, we ended up using webjea to call a scheduled task which ran the cmdlets with the inputs and then had the site read the output back to the user. It worked for our requirements. |
I'm trying to use WebJea to connect to ExchangeOnline using the new Powershell v2 cmdlets.
I keep getting an error of "Access denied." The same credentials work if run from powershell directly on the server.
Anybody have suggestions?
The text was updated successfully, but these errors were encountered: