Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Core.ProfilePictureUploader - Error (Parameter name: cookieHeader) #1817

Open
Wee-Tommy opened this issue Sep 25, 2018 · 10 comments
Open

Core.ProfilePictureUploader - Error (Parameter name: cookieHeader) #1817

Wee-Tommy opened this issue Sep 25, 2018 · 10 comments

Comments

@Wee-Tommy
Copy link

Hi,

An error has started to appear using the sharepoint profile picture uploader.
Core.ProfilePictureUploader

Category

[X] Bug
[ ] Enhancement

Environment

[X] Office 365 / SharePoint Online
[ ] SharePoint 2016
[ ] SharePoint 2013

This was working up until a few weeks ago.
This is the error that is being generated:

25/09/2018 12:07:13 : Initializing SPO web service https://-admin.sharepoint.com/_vti_bin/userprofileservice.asmx
25/09/2018 12:07:13 : Error initiating connection to profile web service in SPO Value cannot be null.
Parameter name: cookieHeader
25/09/2018 12:07:13 : Processing finished for 0 user profiles (or so)
25/09/2018 12:07:37 : Initializing SPO web service https://
-admin.sharepoint.com/_vti_bin/userprofileservice.asmx
25/09/2018 12:09:48 : Initializing SPO web service https://****-admin.sharepoint.com/_vti_bin/userprofileservice.asmx

Thanks for any help you can provide.
Mark.

@cffebradley
Copy link

I am having the same issue. Have you found a solution?

@Wee-Tommy
Copy link
Author

Wee-Tommy commented Oct 16, 2018

Hi there.

Yeah. It's not a full solution but the cause of the issue was that we disabled legacy authentication protocols on our tenant. (Set-SPOTenant -LegacyAuthProtocolsEnabled $false)
This seems to have stopped the uploader working.
I reverted this back to true and tested and it started working again.

It seems to be because the picture profile uploader does not support modern authentication.
If this could be modified to support modern authentication it would be great and solve all the issues.

Another powershell plugin for Sharepoint online i've used is the PnP (https://docs.microsoft.com/en-us/sharepoint/dev/community/community). This is great for recycle bin scripts.
This also stopped working due to disabling legacy authentication protocols but found out it actually supports modern authentication via a switch
(Connect-PnPOnline -Url https://abcde.sharepoint.com/sites/testsite -UseWebLogin).

Thanks,
Mark.

@cffebradley
Copy link

Strange, I set mine to true and I still get the same error.

@Wee-Tommy
Copy link
Author

Hi,
Did you leave it for a few hours or try it straight away?
https://www.koskila.net/how-to-fix-the-web-site-does-not-support-sharepoint-online-credentials-the-response-status-code-is-unauthorized-error/
That is the article i read, he said he left overnight... however mine worked after a few hours.
There is also 2 powershell commands he says about.
Thanks,
Mark.

@cffebradley
Copy link

overnight but I'll try again. Still get cookieHeader error.

@Wee-Tommy
Copy link
Author

That's really weird!
You could try this as another test?
http://www.farookkhan.com/2018/01/sharepoint-powershell-restore-recycle-bin/

With legacy authentication protocols disabled i couldn't use this PS module.
With it enabled again i could.

However if you disable legacy auth you can still use these modules by putting the switch at the end -UseWebLogin which forces it to use modern authentication.

@cffebradley
Copy link

Nothing in bin to restore and adding -UseWebLogin made no change. I'll try again tomorrow but so far still getting the cookieHeader error.

@bvanaerde
Copy link

Is it possible your tenant name was incorrect?
I made the mistake by entering the full URL instead of the name, and got the exact same error message you mentioned.

After changing it to the correct tenant name, the script worked perfectly.

@mukeshy1
Copy link

mukeshy1 commented Jun 4, 2021

i have the same issue for bulk update profile pic, the script has been working fine until now.

Error initiating connection to profile web service in SPO Value cannot be null.
Parameter name: cookieHeader

@geofft68
Copy link

geofft68 commented Jun 8, 2021

I was able to resolve this by adding this code snippet underneath the section of ProfilePictureUploader.exe.config file.

<runtime>
	<AppContextSwitchOverrides value="Switch.System.Net.DontEnableSchUseStrongCrypto=false" />
</runtime>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants