Open vimalpatel1826 opened 5 years ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Same for SharePointPnPPowerShellOnline 3.9.1905.3
I have the same error with a Tenant (MFA enabled) in 3.13.19 version.
Do you find a fix or workaround ?
Reporting an Issue or Missing Feature
Set-PnPWebTheme : The remote server returned an error: (403) Forbidden
Expected behavior
Should be able to set the theme specified in the argument.
Actual behavior
Please describe what you see instead. Please provide samples of HTML output or screenshots
Steps to reproduce behavior
Connect-PnPOnline -Url "mytenanturl" -UseWebLogin
Note: I have MFA enabled in my tenant.
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name *pnppowershell* -ListAvailable
) 3.8.1904.0 - SharePointPnPPowerShellOnlineHow did you install the PnP-PowerShell Cmdlets?
Get-PnPException - Attached below.
Message : The remote server returned an error: (403) Forbidden. Stacktrace : at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactoryd0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at
Microsoft.SharePoint.Client.ClientContext.d b.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.SharePoint.Client.ClientContext.d8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.SharePoint.Client.ClientContext.d 4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at Microsoft.SharePoint.Client.ClientContextExtensions.d7.M
oveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.SharePoint.Client.ClientContextExtensions.d 7.M
oveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task)
at
Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryRetry(ClientRuntimeContext
clientContext, Int32 retryCount, Int32 delay, String userAgent)
at SharePointPnP.PowerShell.Commands.Branding.SetWebTheme.ExecuteCmdlet()
at SharePointPnP.PowerShell.Commands.PnPCmdlet.ProcessRecord()
ScriptLineNumber : 1
1.FromAsyncCoreLogic(IAsyncResult iar, Func
2 endFunction, Action1 endAction, Task
1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.SPWebRequestExecutor.