Skip to main content
Tweeted twitter.com/StackSharePoint/status/1209126611431411712
added 15 characters in body; edited tags
Source Link
Ganesh Sanap - MVP
  • 46.4k
  • 22
  • 31
  • 63

I am able to log in to my SharePoint online site using my credential but when I am connecting to the same SharePoint online site using the same credentials using PowerShell CSOM - getting the invalid credential error - tried to connect to the same site using sharegate tool it works but only with powershell it fails.

Connection sample code :

$UserName="[email protected]"
$Password ="MyPassword"

#Setup Credentials to connect
   $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName,(ConvertTo-SecureString $Password -AsPlainText -Force))
#Set up the context

$Context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
 $Context.Credentials = $credentials

Thanks in advance - any help is greatly appreciated.

I am able to log in to my SharePoint online site using my credential but when I am connecting to the same SharePoint online site using the same credentials using PowerShell CSOM - getting the invalid credential error - tried to connect to the same site using sharegate tool it works but only with powershell it fails.

Connection sample code :

$UserName="[email protected]"
$Password ="MyPassword"

#Setup Credentials to connect
   $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName,(ConvertTo-SecureString $Password -AsPlainText -Force))
#Set up the context

$Context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
 $Context.Credentials = $credentials

Thanks in advance - any help is greatly appreciated.

I am able to log in to my SharePoint online site using my credential but when I am connecting to the same SharePoint online site using the same credentials using PowerShell CSOM - getting the invalid credential error - tried to connect to the same site using sharegate tool it works but only with powershell it fails.

Connection sample code :

$UserName="[email protected]"
$Password ="MyPassword"

#Setup Credentials to connect
   $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName,(ConvertTo-SecureString $Password -AsPlainText -Force))
#Set up the context

$Context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
 $Context.Credentials = $credentials

Thanks in advance - any help is greatly appreciated.

added 433 characters in body; deleted 4 characters in body
Source Link

I am able to log in to my SharePoint online site using my credential but when I am connecting to the same SharePoint online site using the same credentials using PowerShell CSOM - getting the invalid credential error - tried to connect to the same site using sharegate tool it works but only with powershell it fails.

Connection sample code :

$UserName="[email protected]"
$Password ="MyPassword"

#Setup Credentials to connect
   $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName,(ConvertTo-SecureString $Password -AsPlainText -Force))
#Set up the context

$Context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
 $Context.Credentials = $credentials

Thanks in advance - any help is greatly appreciated.

I am able to log in to my SharePoint online site using my credential but when I am connecting to the same SharePoint online site using the same credentials using PowerShell CSOM - getting the invalid credential error - tried to connect to the same site using sharegate tool it works but only with powershell it fails.

Thanks in advance - any help is greatly appreciated.

I am able to log in to my SharePoint online site using my credential but when I am connecting to the same SharePoint online site using the same credentials using PowerShell CSOM - getting the invalid credential error - tried to connect to the same site using sharegate tool it works but only with powershell it fails.

Connection sample code :

$UserName="[email protected]"
$Password ="MyPassword"

#Setup Credentials to connect
   $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName,(ConvertTo-SecureString $Password -AsPlainText -Force))
#Set up the context

$Context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl)
 $Context.Credentials = $credentials

Thanks in advance - any help is greatly appreciated.

Source Link

SharePoint Online credential is not working in PowerShell

I am able to log in to my SharePoint online site using my credential but when I am connecting to the same SharePoint online site using the same credentials using PowerShell CSOM - getting the invalid credential error - tried to connect to the same site using sharegate tool it works but only with powershell it fails.

Thanks in advance - any help is greatly appreciated.