Symptom
The following error occurs in SAP Analytics Cloud (SAC) when trying to create Open Connectors SharePoint connection in SAP Analytics Cloud :
- Sorry, something went wrong. The query string "redirect_uri" is missing or invalid.
- Missing or invalid query text "redirect_url"
Environment
- SAP Analytics Cloud (Enterprise) 2021.08.14
Reproducing the Issue
- Create Open Connectors SharePoint connection.
- Upon clicking on the Save button observe the error message.
Cause
Microsoft recently changed SharePoint / Azure OAuth app redirect URIs and client secret validity behaviours.
You can independently verify the behaviour without SAP Analytics Cloud and use a browser to perform the test. Open a browser and hit SharePoint team with:
https://<URL_to_SharePoint_site>/_layouts/15/OAuthAuthorize.aspx?redirect_uri=<Redirect_URI>&client_id=<Client_ID>&response_type=code&scope=<Scope>&state=sharepoint
Replace the following placeholders:
<URL_to_SharePoint_site>
<Redirect_URI>
-- You will need to replace all : as %3A
-- You will need to replace all / as %2F
-- Example: https%3A%2F%2Foauth-r.cfapps.sap.hana.ondemand.com%3A443
<Client_ID>
<Scope>
-- Example: AllSites.Manage
If you are seeing "Do you trust <app_name>?" then the setup is OK.
If you are seeing "Sorry, something went wrong The query string "redirect_uri" is missing or invalid." then the redirect URI is not accepted by SharePoint for the given Azure OAuth app.
Apperantly multiple redirect URIs in Azure OAuth app is not working as expected. When you registers additional redirect URI, it may have "random" sorting placement in your Azure OAuth app > Authentication > Web > Redirect URIs. Only the top entry in redirect URI will work to authenticate in SharePoint.
Even if you try to delete redirect URIs in Azure OAuth app > Authentication > Web > Redirect URIs to manually change the sorting order, it would not take effect as to which redirect URI would be accepted by SharePoint. You can verify this behaviour be deleting the top redirect URI entry from Azure OAuth app, but it would still be accepted by SharePoint as valid redirect URI.
(As tested on 2021 October 25.)
Resolution
Create a new Azure OAuth app and set to the correct redirect URI the first time, then verify in Azure OAuth app > Authentication > Web > Redirect URIs.
As the current/best workaround to find your redirect URI for your SAP Analytics Cloud tenant without checking the user guide, try to create a new "OData Services" connection in SAC, change Authentication Type to "OAuth 2.0 Authorization Code" then you will be able to see the redirect URI at the bottom of the dialog.
To verify the setup, open a browser and hit SharePoint URL with:
https://<URL_to_SharePoint_site>/_layouts/15/OAuthAuthorize.aspx?redirect_uri=<Redirect_URI>&client_id=<Client_ID>&response_type=code&scope=<Scope>&state=sharepoint
Replace the following placeholders:
<URL_to_SharePoint_site>
<Redirect_URI>
-- You will need to replace all : as %3A
-- You will need to replace all / as %2F
-- Example: https%3A%2F%2Fbocauth.us1.sapbusinessobjects.cloud%3A443
-- Example: https%3A%2F%2Foauth-r.cfapps.sap.hana.ondemand.com%3A443
<Client_ID>
<Scope>
-- Example: AllSites.Manage
Note, currently the maximum client secret is valid for 24 months and cannot no longer create one with no end date (12/31/2299).
See Also
- 2569847 - Where can you find SAC user assistance (help) to use, configure, and operate it more effectively?
- Have a question? Ask it here and let our amazing SAP community help! Or reply and share your knowledge!
- 2487011 - What information do I need to provide when opening a case for SAP Analytics Cloud?
- 2511489 - Troubleshooting performance issues in SAP Analytics Cloud
- Search for SAP Analytics Cloud content using Google or Bing:
- https://www.google.ca/search?q=site%3Ahttps%3A%2F%2Fapps.support.sap.com+SAP+Analytics+Cloud
- https://www.bing.com/search?q=site%3Ahttps%3A%2F%2Fapps.support.sap.com+SAP+Analytics+Cloud
- Note: Add relevant text or warning/error messages to the text search field to filter results.
- SAP Analytics Cloud Connection Guide
- Getting Started with SAP Analytics Cloud Expert Community page
- SAP Analytics Cloud Get More Help and SAP Support
- Need More Help? Contact Support or visit the solution finder today!
Your feedback is important to help us improve our knowledge base.
Keywords
SAP Cloud for Planning, sc4p, c4p, cforp, cloudforplanning, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics,Error, Issue, System, Data, User, Unable, Access, Connection, Sac, Connector, Live, Acquisition, Up, Set, setup, Model, BW, Connect, Story, Tenant, Import, Failed, Using, Working, SAML, SSO, sapanalyticscloud, sap analytical cloud, sap analytical cloud, SAC, sap analyst cloud, connected, failure, stopped, sap analyst cloud, https://hcs.cloud.sap, https://hanacloudservices.cloud.sap, https://cloudanalytics.accounts.ondemand.com, https://hanacloudservices-us.accounts.ondemand.com, https://www.sap.com, https://help.sap.com, predictive analytics (analysis), data analysis (analytics) tools, analytics tools, sap analytics cloud, data literacy, advanced analytics, data democratization, analytics software, real time analytics, self service analytics, advanced data analytics, analytics as a service, analytics cloud / cloud analytics, saas analytics, cloud bi, enterprise planning, cloud data analytics, cloud based analytics, analytics cloud platform, modern analytics, real time analysis, cloud analytics solution(s), what is sap analytics cloud, cloud analytics tools, analytics in the cloud, cloud analytics software, SharePoint, Share Point, connection, redirect_url, missing or invalid query text "redirect_url" , KBA , LOD-ANA-ADM , SAC Administration , Problem