<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cisco OAuth SSO - Get User Information in Services Discussions</title>
    <link>https://community.cisco.com/t5/services-discussions/cisco-oauth-sso-get-user-information/m-p/3988113#M645</link>
    <description>&lt;P&gt;Yes, I found a way to get user information (but not sure if I can use some other ways)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Authorization: in this step, an authorization code will be fetched for the created application. So in case of a web page, URL should be redirected to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;&lt;A href="https://cloudsso.cisco.com/as/authorization.oauth2?scope=openid+profile&amp;amp;response_type=code&amp;amp;client_id={client_id}&amp;amp;redirect_uri={website_url" target="_blank"&gt;https://cloudsso.cisco.com/as/authorization.oauth2?scope=openid+profile&amp;amp;response_type=code&amp;amp;client_id={client_id}&amp;amp;redirect_uri={website_url&lt;/A&gt;}&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) After the login done sucessfully, the page will be redirected to &lt;EM&gt;website_url&lt;/EM&gt; with &lt;EM&gt;code&lt;/EM&gt; as a URL parameter. This code will be used to fetch the access token by sending a post request to &lt;STRONG&gt;&lt;A href="https://cloudsso.cisco.com/as/token.oauth2&amp;nbsp;" target="_blank"&gt;https://cloudsso.cisco.com/as/token.oauth2&amp;nbsp;&lt;/A&gt;&lt;/STRONG&gt;with data below (content type is 'application/x-www-form-urlencoded'):&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;client_id={client_id}&amp;amp;client_secret={client_secret}&amp;amp;code={code from the first step}&amp;amp;redirect_uri={website_url}&amp;amp;grant_type="authorization_code"&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The response will contain the access token to be used for API Rest Calls, and this will be used as a part of request headers for the API requests:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Authorization:&amp;nbsp;Bearer {access_token}&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) User information can be fetched by sending a GET request with the access token using the following URL:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://cloudsso.cisco.com/idp/userinfo.openid" target="_blank"&gt;https://cloudsso.cisco.com/idp/userinfo.openid&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Nov 2019 21:24:15 GMT</pubDate>
    <dc:creator>hmubarak</dc:creator>
    <dc:date>2019-11-22T21:24:15Z</dc:date>
    <item>
      <title>Cisco OAuth SSO - Get User Information</title>
      <link>https://community.cisco.com/t5/services-discussions/cisco-oauth-sso-get-user-information/m-p/3987936#M644</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am very new in using Cisco OAuth 2.0. Currently, I have created a sample app under&amp;nbsp;&lt;A href="https://apiconsole.cisco.com/" target="_blank" rel="noopener"&gt;https://apiconsole.cisco.com/&lt;/A&gt;&amp;nbsp;and I have used client details for OAuth like the following:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://cloudsso.cisco.com/as/authorization.oauth2?response_type=token&amp;amp;client_id=MY_APP_CLIENT_ID&amp;amp;redirect_uri={my_website" target="_blank" rel="noopener"&gt;https://cloudsso.cisco.com/as/authorization.oauth2?response_type=token&amp;amp;client_id={client_id}&amp;amp;redirect_uri={website_url&lt;/A&gt;}&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After the login process, thre request was redirected successfully as below:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;{website_url}/#access_token={token_value}&amp;amp;scope=&amp;amp;state=mystate&amp;amp;token_type=Bearer&amp;amp;expires_in=3599&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any API (or docs reference), that can be used&amp;nbsp;to retrieve basic user information (like name, email,...) using the token (Bearer authentication) from the URL result?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 16:47:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/cisco-oauth-sso-get-user-information/m-p/3987936#M644</guid>
      <dc:creator>hmubarak</dc:creator>
      <dc:date>2019-11-22T16:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco OAuth SSO - Get User Information</title>
      <link>https://community.cisco.com/t5/services-discussions/cisco-oauth-sso-get-user-information/m-p/3988113#M645</link>
      <description>&lt;P&gt;Yes, I found a way to get user information (but not sure if I can use some other ways)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Authorization: in this step, an authorization code will be fetched for the created application. So in case of a web page, URL should be redirected to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;&lt;A href="https://cloudsso.cisco.com/as/authorization.oauth2?scope=openid+profile&amp;amp;response_type=code&amp;amp;client_id={client_id}&amp;amp;redirect_uri={website_url" target="_blank"&gt;https://cloudsso.cisco.com/as/authorization.oauth2?scope=openid+profile&amp;amp;response_type=code&amp;amp;client_id={client_id}&amp;amp;redirect_uri={website_url&lt;/A&gt;}&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) After the login done sucessfully, the page will be redirected to &lt;EM&gt;website_url&lt;/EM&gt; with &lt;EM&gt;code&lt;/EM&gt; as a URL parameter. This code will be used to fetch the access token by sending a post request to &lt;STRONG&gt;&lt;A href="https://cloudsso.cisco.com/as/token.oauth2&amp;nbsp;" target="_blank"&gt;https://cloudsso.cisco.com/as/token.oauth2&amp;nbsp;&lt;/A&gt;&lt;/STRONG&gt;with data below (content type is 'application/x-www-form-urlencoded'):&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;client_id={client_id}&amp;amp;client_secret={client_secret}&amp;amp;code={code from the first step}&amp;amp;redirect_uri={website_url}&amp;amp;grant_type="authorization_code"&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The response will contain the access token to be used for API Rest Calls, and this will be used as a part of request headers for the API requests:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Authorization:&amp;nbsp;Bearer {access_token}&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) User information can be fetched by sending a GET request with the access token using the following URL:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://cloudsso.cisco.com/idp/userinfo.openid" target="_blank"&gt;https://cloudsso.cisco.com/idp/userinfo.openid&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 21:24:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/cisco-oauth-sso-get-user-information/m-p/3988113#M645</guid>
      <dc:creator>hmubarak</dc:creator>
      <dc:date>2019-11-22T21:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco OAuth SSO - Get User Information</title>
      <link>https://community.cisco.com/t5/services-discussions/cisco-oauth-sso-get-user-information/m-p/4101420#M711</link>
      <description>&lt;P&gt;I am registering an application in apiconsole.cisco.com&lt;/P&gt;
&lt;P&gt;What should be value for "Re-direction URL" when the grand-type Authorization Code is selected.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 10:13:56 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/cisco-oauth-sso-get-user-information/m-p/4101420#M711</guid>
      <dc:creator>savramap</dc:creator>
      <dc:date>2020-06-11T10:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Cisco OAuth SSO - Get User Information</title>
      <link>https://community.cisco.com/t5/services-discussions/cisco-oauth-sso-get-user-information/m-p/4101846#M712</link>
      <description>&lt;P&gt;Just to make sure about the question, redirect URL should be the URL from your website (Webapp URL), it will be redirected after logging-in as below:&lt;BR /&gt;&lt;BR /&gt;your_website_url?code={auth_code_from_sso}&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 20:56:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/services-discussions/cisco-oauth-sso-get-user-information/m-p/4101846#M712</guid>
      <dc:creator>hmubarak</dc:creator>
      <dc:date>2020-06-11T20:56:46Z</dc:date>
    </item>
  </channel>
</rss>

