-
- Novice
- Posts: 6
- Liked: never
- Joined: Feb 18, 2022 3:16 pm
- Full Name: Alphone Davies
- Contact:
Powershell Fails to connect to O365
trying to setup Public Folder backup and have followed Veeam guides on how to setup the permissions for the account used for authentication.
its failing to connect to powershell even though, Exchange Online remote powershell is enabled. i can connect to my tenant outside of veeam just fine.
Exact Error:
'Connect to Powershell: Connecting to remote server outlook.office365.com failed with the following error message: Access is denied. for more information, see about_Remote_Troubleshooting help topic"
its failing to connect to powershell even though, Exchange Online remote powershell is enabled. i can connect to my tenant outside of veeam just fine.
Exact Error:
'Connect to Powershell: Connecting to remote server outlook.office365.com failed with the following error message: Access is denied. for more information, see about_Remote_Troubleshooting help topic"
-
- Product Manager
- Posts: 9848
- Liked: 2607 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: Powershell Fails to connect to O365
Does your tenant already has disabled basic Auth?
I see this message when Microsoft has disabled Basic Auth for a tenant.
https://community.veeam.com/blogs-and-p ... tocol-1805
I see this message when Microsoft has disabled Basic Auth for a tenant.
https://community.veeam.com/blogs-and-p ... tocol-1805
Product Management Analyst @ Veeam Software
-
- Novice
- Posts: 6
- Liked: never
- Joined: Feb 18, 2022 3:16 pm
- Full Name: Alphone Davies
- Contact:
Re: Powershell Fails to connect to O365
it was disabled but i enabled it back for Remote powershell
-
- Product Manager
- Posts: 9848
- Liked: 2607 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: Powershell Fails to connect to O365
How long did you wait before trying again?
Product Management Analyst @ Veeam Software
-
- Novice
- Posts: 6
- Liked: never
- Joined: Feb 18, 2022 3:16 pm
- Full Name: Alphone Davies
- Contact:
Re: Powershell Fails to connect to O365
knew it might take a few hours so enabled it on Friday afternoon.
-
- Product Manager
- Posts: 9848
- Liked: 2607 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: Powershell Fails to connect to O365
Ok, that is long enough. Is it possible that Azure Security Defaults are enabled in your Tenant?
If not, a support case with veeam is needed to analyze this issue. I‘m sure they can tell you from the debug logs what is happening in the background.
If not, a support case with veeam is needed to analyze this issue. I‘m sure they can tell you from the debug logs what is happening in the background.
Product Management Analyst @ Veeam Software
-
- Novice
- Posts: 6
- Liked: never
- Joined: Feb 18, 2022 3:16 pm
- Full Name: Alphone Davies
- Contact:
Re: Powershell Fails to connect to O365
Thanks Fabian, i've contacted and waiting for Veeam to get back to me.
-
- Novice
- Posts: 6
- Liked: never
- Joined: Jun 02, 2016 11:24 am
- Full Name: Dmitriy
- Contact:
Re: Powershell Fails to connect to O365
Did you resolve the issue? We faced same problem. When we try to run backup for O365, it fails at powershell check step and if we try to connect manually with this:
$Cred= Get-Credential
$Session= New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/PowerShell-LiveID -Credential $Cred -Authentication Basic -AllowRedirection
We got error:
"Connect to Powershell: Connecting to remote server outlook.office365.com failed with the following error message: Access is denied. for more information, see about_Remote_Troubleshooting help topic"
MS site said:
This issue occurs for one of the following reasons:
1) You enter an incorrect user name or password.
2) You try to sign in to the service by using an account that doesn't have access to Exchange Online.
3)You have security defaults enabled in your tenant
1) I can login with this account to any Azure/365 service
2) Account is in Global admin and Organization management groups
3) Security default disabled. And i've also checked Basic Auth via EXCHO Admin Center: Microsoft has not blocked Basic authentication for any protocol or feature for your tenant.
$Cred= Get-Credential
$Session= New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/PowerShell-LiveID -Credential $Cred -Authentication Basic -AllowRedirection
We got error:
"Connect to Powershell: Connecting to remote server outlook.office365.com failed with the following error message: Access is denied. for more information, see about_Remote_Troubleshooting help topic"
MS site said:
This issue occurs for one of the following reasons:
1) You enter an incorrect user name or password.
2) You try to sign in to the service by using an account that doesn't have access to Exchange Online.
3)You have security defaults enabled in your tenant
1) I can login with this account to any Azure/365 service
2) Account is in Global admin and Organization management groups
3) Security default disabled. And i've also checked Basic Auth via EXCHO Admin Center: Microsoft has not blocked Basic authentication for any protocol or feature for your tenant.
-
- VeeaMVP
- Posts: 1007
- Liked: 314 times
- Joined: Jan 31, 2011 11:17 am
- Full Name: Max
- Contact:
Re: Powershell Fails to connect to O365
Have you configured the authentication policy as described in this article?
https://www.veeam.com/kb2969#Exchange
https://www.veeam.com/kb2969#Exchange
-
- Novice
- Posts: 6
- Liked: never
- Joined: Jun 02, 2016 11:24 am
- Full Name: Dmitriy
- Contact:
Re: Powershell Fails to connect to O365
Yes. We use basic auth only:
- Account is a global admin
- Apps that don't use modern authentication" has been set to "Allow Access" already
I've noticed that if i try to connect manually via "Connect-ExchangeOnline", it works. If i try to connect via "New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/", i got access denied.
Veeam backup module updated to last version.
- Account is a global admin
- Apps that don't use modern authentication" has been set to "Allow Access" already
I've noticed that if i try to connect manually via "Connect-ExchangeOnline", it works. If i try to connect via "New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/", i got access denied.
Veeam backup module updated to last version.
-
- Product Manager
- Posts: 8191
- Liked: 1322 times
- Joined: Feb 08, 2013 3:08 pm
- Full Name: Mike Resseler
- Location: Belgium
- Contact:
Re: Powershell Fails to connect to O365
The OP didn't leave a support ticket ID so I can't check. I advice to also create a support call and put the support case ID here in the thread
-
- Novice
- Posts: 6
- Liked: never
- Joined: Jun 02, 2016 11:24 am
- Full Name: Dmitriy
- Contact:
Re: Powershell Fails to connect to O365
I was able to work around via connection with cloud global admin account (@yourdomain.onmicrosoft.com). Don't know why domain account (with global admin in azure/365) get access denied.
-
- Product Manager
- Posts: 8191
- Liked: 1322 times
- Joined: Feb 08, 2013 3:08 pm
- Full Name: Mike Resseler
- Location: Belgium
- Contact:
Re: Powershell Fails to connect to O365
That's a weird one. That should not be an issue. So there might be some issues in your Azure AD to AD itself. But to be honest I cannot think of why at this moment
Who is online
Users browsing this forum: No registered users and 9 guests