0
votes

my organization move to Office 365 and users should have all GAL contacts on their folder contacts and phones. I try to use a Steve!

But I've got:

Exception calling "AutodiscoverUrl" with "1" argument(s): "Autodiscover blocked a potentially insecure redirection to h ttps://autodiscover-s.outlook.com/autodiscover/autodiscover.xml. To allow Autodiscover to follow the redirection, use t he AutodiscoverUrl(string, AutodiscoverRedirectionUrlValidationCallback) overload." At C:\PS\Import-MailboxContacts.ps1:159 char:9 + $service.AutodiscoverUrl($EmailAddress); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : AutodiscoverLocalException

Any ideas how I can add contacts?

1
It's not clear what you are asking or what you are doing to get that error. For example, I'm guessing that you used a Power Shell script of some kind because of your tag, but I have no idea of the topology of your environment, nor which server (or type/role) you ran a script against, nor what the script you ran is.YetAnotherRandomUser

1 Answers

0
votes

In that script you reference you need to change the line

$service.AutodiscoverUrl($EmailAddress);

to

$service.AutodiscoverUrl($MailboxName,{$true})  

This will essentially allow redirection of Autodiscover you need for Office365