Thursday, August 11, 2016

Fixing apps after configuring Cloud Hybrid Search

Summary: The original post can be found here http://ift.tt/2aZGxd9

In my previous blog post I have described some considerations before configuring cloud hybrid search in your environment.

Especially this one can really mess up your farm:
All provider-hosted add-ins will break when running the onboarding script.
Long story short, it will break every server-to-server trust, as the SPAuthenticationRealm is changed.

To fix this, I wrote a script that gives you 2 options:

- Undo
This will reverse the change made by the onboarding script. It will change the SPAuthenticationRealm back to the old value.
If you choose this option, cloud hybrid search will not work, but at least your apps are working again.

- Fix
This option will try to change your SPTrustedSecurityTokenIssuers so that it uses the new SPAuthenticationRealm set by the onboarding script.
* There are some notes that I described later in this post, make sure to read them.

Running the script will result in something like this:

cloud hybrid search
Running the Fix-Onboarding.ps1 script

You can download the script here:
Fix-Onboarding

Notes
If you choose to fix your SPTrustedSecurityTokenIssuers, you will need to do some additional work to have everything work again.

  • Regrant app permissions


App permissions rely on the SPAuthenticationRealm.
This means that any App permissions that you set, will be gone after updating your SPTrustedSecurityTokenIssuers.
You will have to register the apps again and assign the permissions to the app.
The following script can do this for you (the current script is app-instance based, this means you have to run it for every app instance.
Also, make sure to change the variables in the script before running it.
Set-SPAppPermissions

  • Workflow Manager


Workflow Manager also relies on the SPAuthenticationRealm. Thanks to Ruben de Boer for proposing the solution.
After running the Fix-Onboarding.ps1 script, make sure to remove the existing Workflow Service Application Proxy.
Then run the Register-SPWorkflowService cmdlet again. Make sure to use the same scope that you used before. I recommend using the -Force parameter.

I hope this helps anyone! Do not hesitate to contact me if you have any trouble using the script of have any questions.


by Nico Martens via Everyone's Blog Posts - SharePoint Community

No comments:

Post a Comment