FYI, Esri has an issue with authorization codes (ECP*) that are being issued by My.Esri site for Portal for ArcGIS licenses.
Our annual developer license expired on 9/3/2017 and since then we have been unable to generate an authorization code that works with Portal.
At this time, I am unable to login to any interface, including Portal site and Portaladmin, nor am I able to run commandline tools such as "listusers" in accountmanagement. The error message from PortalAdmin dialog is cryptic, in that it simply says the user is not authorized to access this resource. I only get an indication that the software is not authorized from the portal site itself.
We're running 10.4.1 on Windows
As of afternoon 9/6/2017, Esri tech support says they are working on the issue and will let me know when it's resolved.