I have ags secured feature services, that has been added to agol as a feature service item, with the credentials stored.
This has worked for a long time.
Today we've change the ags server, but the url and credentials are the same.
All of the services works fine, except one. When I click on the layer from the web map overview page, I get an error:
|ArcGIS Portal Directory|
I've solved it myself, so just for the record:
I've check the web map JSON using Ago-assistant, and found that one line was missing, with "itemid".
I've added it and all works fine.
I don't know why it happened.