Hello all,
I went through this link in an effort to successfully login to AGOL using my enterprise account however, I am continually faced with invalid credentials error. The authorization to my enterprise account is windows authentications and hence I used my windows password. I am still unsuccessful. Any pointers would help!
When I use a built-in account, I am able to login successfully
<SPAN class="keyword token">from</SPAN> arcgis<SPAN class="punctuation token">.</SPAN>gis <SPAN class="keyword token">import</SPAN> GIS
insPortal <SPAN class="operator token">=</SPAN> GIS<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"portal-link"</SPAN><SPAN class="punctuation token">,</SPAN> username <SPAN class="operator token">=</SPAN> <SPAN class="string token">'AGOL_uname'</SPAN><SPAN class="punctuation token">,</SPAN> password <SPAN class="operator token">=</SPAN> <SPAN class="string token">'password'</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Logged in as: "</SPAN> <SPAN class="operator token">+</SPAN> str<SPAN class="punctuation token">(</SPAN>insPortal<SPAN class="punctuation token">.</SPAN>properties<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">print</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">'Login Succesful'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>