I'm currently provisioning Navigation Term Set programatically and then programatically assigning that as the Global Navigation of my site. I am using SharePoint 2013.
Problem is, it seems to not be attached properly immediately. I receive an error that says the Navigation Term Set was not assigned properly.
I think this is because it is not immediately recognized by SharePoint? I notice that there is something like a "new" icon on the Navigation term set. After a few times of assigning / re-assigning the navigation by switching from Managed Metadata to Structural, I notice that it the icon of the Navigation Term Set changes (grayish icon). Once it changes, I can then successfully assign it.
Any ideas as to how to solve this?