<?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>Question Re: SAC REST API: How to obtain Authorization Code using Auth URL? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/sac-rest-api-how-to-obtain-authorization-code-using-auth-url/qaa-p/12560694#M4709632</link>
    <description>&lt;P&gt;Have you taken a look at this documentation?  My test I initially used the Basic Auth to get the token then pass that token to the API's.&lt;BR /&gt;&lt;A href="https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/00f68c2e08b941f081002fd3691d86a7/e4914540f5c04fd2b5b8be5675248be2.html" target="test_blank"&gt;https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/00f68c2e08b941f081002fd3691d86a7/e4914540f5c04fd2b5b8be5675248be2.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Is your goal to use the OAuth2 to authenticate uses in SAC?&lt;/P&gt;</description>
    <pubDate>Thu, 28 Apr 2022 23:51:45 GMT</pubDate>
    <dc:creator>vitran23</dc:creator>
    <dc:date>2022-04-28T23:51:45Z</dc:date>
    <item>
      <title>SAC REST API: How to obtain Authorization Code using Auth URL?</title>
      <link>https://community.sap.com/t5/technology-q-a/sac-rest-api-how-to-obtain-authorization-code-using-auth-url/qaq-p/12560692</link>
      <description>&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2043817-2022-04-28-12h42-28.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2043818-2022-04-28-13h05-42.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Hello Dear SAP Community,&lt;BR /&gt;&lt;BR /&gt;I am trying to implement SAC REST API functionality using Python. I am following this documentation article:&lt;BR /&gt;&lt;BR /&gt;Configuring OAuth 2.0 Authorization Code Grant Workflow&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/14cac91febef464dbb1efce20e3f1613/23ec63397cb041f4a920515973c31003.html?locale=en-US" target="test_blank"&gt;https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/14cac91febef464dbb1efce20e3f1613/23ec63397cb041f4a920515973c31003.html?locale=en-US&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The application will need to:&lt;BR /&gt;&lt;BR /&gt;1.Request Authorization Code.&lt;BR /&gt; 1.This must be done through the tenant Authorization URL.&lt;BR /&gt; 2.The user must enter their SAP Analytics Cloud tenant credentials when redirected to the tenant IdP.&lt;BR /&gt; 3.Access to the requested resources must be authorized by the user when prompted.&lt;BR /&gt;&lt;BR /&gt;2.Request Access Token.&lt;BR /&gt; 1.This must be done via the tenant Token URL.&lt;BR /&gt; 2.The Authorization Code from step 1 is required.&lt;BR /&gt; 3.The OAuth Client ID and Secret and must be provided as part of the request.&lt;BR /&gt;If OAuth authorization is successful, the returned token can be used to access the API.&lt;BR /&gt;&lt;BR /&gt;However, I have a problem with getting the Authorization Code. In the App Integrations Section I have created an OAuth Client, where configured a redirect url.&lt;BR /&gt;&lt;BR /&gt;When I navigate to "https://&amp;lt;&amp;gt;.authentication.eu10.hana.ondemand.com/oauth/authorize" (by clicking the button on the front-end, which calls the endpoint on the backend with the auth url). Then the login window is opened (at the end of the url stands ?SAMLRequest= is added), there I type the credentials, click Login and then the error message is shown (Uh oh. Something went amiss.)&lt;BR /&gt;&lt;BR /&gt;I cannot find out how to configure the Auth URL. I have tried to add as parameters client_id and response_type, which are usually used in OAuth2.0, but it did not help (401 Response).&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;'https://&amp;lt;---&amp;gt;.authentication.eu10.hana.ondemand.com/oauth/authorize?response_type=code&amp;amp;client_id={CLIENT_ID}&amp;amp;redirect_uri={REDIRECT_URI}'&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I could not also find any information (only the article from 2018, which is already outdated).&lt;BR /&gt;&lt;BR /&gt;There is a lot of information how to get an access token using the token url &lt;A href="https://&amp;lt;&amp;gt;.authentication.eu10.hana.ondemand.com/oauth/token" target="test_blank"&gt;https://&amp;lt;&amp;gt;.authentication.eu10.hana.ondemand.com/oauth/token&lt;/A&gt;. I have tested this one, it works but for me it is not the option, I need to allow users to login into their accounts on the SAC tenant and the request token.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 20:55:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sac-rest-api-how-to-obtain-authorization-code-using-auth-url/qaq-p/12560692</guid>
      <dc:creator>former_member801473</dc:creator>
      <dc:date>2022-04-28T20:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAC REST API: How to obtain Authorization Code using Auth URL?</title>
      <link>https://community.sap.com/t5/technology-q-a/sac-rest-api-how-to-obtain-authorization-code-using-auth-url/qaa-p/12560693#M4709631</link>
      <description>&lt;P&gt;Thank
you for visiting SAP Community to get answers to your questions.&lt;/P&gt;

&lt;P&gt;Since you're asking a question here for the first time, I'd like
to recommend you with the following steps so you can get the most out of your
community membership:&lt;/P&gt;

&lt;UL&gt;
 &lt;LI&gt;Please
     see: &lt;A href="https://community.sap.com/resources/questions-and-answers"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt; as this
     resource page provides tips for preparing questions that draw responses
     from our members&lt;/LI&gt;
 &lt;LI&gt;Consider to take
     our Q&amp;amp;A tutorial at: &lt;A href="https://developers.sap.com/tutorials/community-qa.html" target="_blank"&gt;https://developers.sap.com/tutorials/community-qa.html&lt;/A&gt;. as that will
     help you when submitting questions to the community.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I also recommend that you include a profile picture. By
personalizing your profile, you encourage readers to respond: &lt;A href="https://developers.sap.com/tutorials/community-profile.html" target="_blank"&gt;https://developers.sap.com/tutorials/community-profile.html&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;I hope you find this advice useful, and we're happy to have you
as part of SAP Community!&lt;/P&gt;

&lt;P&gt;All the best,&lt;BR /&gt;
-Alex&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 20:55:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sac-rest-api-how-to-obtain-authorization-code-using-auth-url/qaa-p/12560693#M4709631</guid>
      <dc:creator>AlexGourdet</dc:creator>
      <dc:date>2022-04-28T20:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAC REST API: How to obtain Authorization Code using Auth URL?</title>
      <link>https://community.sap.com/t5/technology-q-a/sac-rest-api-how-to-obtain-authorization-code-using-auth-url/qaa-p/12560694#M4709632</link>
      <description>&lt;P&gt;Have you taken a look at this documentation?  My test I initially used the Basic Auth to get the token then pass that token to the API's.&lt;BR /&gt;&lt;A href="https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/00f68c2e08b941f081002fd3691d86a7/e4914540f5c04fd2b5b8be5675248be2.html" target="test_blank"&gt;https://help.sap.com/docs/SAP_ANALYTICS_CLOUD/00f68c2e08b941f081002fd3691d86a7/e4914540f5c04fd2b5b8be5675248be2.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Is your goal to use the OAuth2 to authenticate uses in SAC?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 23:51:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sac-rest-api-how-to-obtain-authorization-code-using-auth-url/qaa-p/12560694#M4709632</guid>
      <dc:creator>vitran23</dc:creator>
      <dc:date>2022-04-28T23:51:45Z</dc:date>
    </item>
  </channel>
</rss>

