You can translate the question and the replies:

To create Excel Datasource from Sharepoint using Authorization grant as client credentials

Hello Team, When we try to create a Excel datasource from Sharepoint using OAuth2.0 with Authorization grant as Authorization code we are able to generate the code and create the datasource but it is not feasible process as we have to open the Authorization URL in browser and then provide the user credentials to generate the code. However when we try to create the the datasource with Authorization grant as client credentials we are able to generate access token but when we test conenction we are getting below error. **Message returned by the server: {"error_description":"Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown."} ** Could you please let us know if 1. There is a way to create datasource from sharepoint using Authorization grant as client credentials. 2. If creating datasource from sharepoint using Authorization grant as client credentials is not possible is there any way we can internally generate the Authorization code in Denodo without having to open the Authorization URL in browser. Thanks in advance.
user
17-11-2021 09:30:57 -0500
code

1 Answer

Hi, I would review the [http path](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_data_sources_and_base_views/path_types_in_virtual_dataport/http_path) section of the Path Types in Virtual DataPort User Guide for more information on configuring OAuth on data sources. Yes, you can connect to Sharepoint with the Authorization grant as Client credentials grant. Here is a [knowledge base article](https://community.denodo.com/kb/en/view/document/How%20to%20access%20Excel%20and%20Delimited%20Files%20in%20SharePoint%20from%20Denodo?category=Data+Sources) describing how to access excel files in Sharepoint. Regarding this error, I would make sure that the app is configured as that document specifies, and in the configure API permissions section, I would select AllSites.Read under Application Permissions. For more information on sharepoint authentication, I would look into the Microsoft Azure OAuth documentation. Hope this helps!
Denodo Team
17-11-2021 16:25:29 -0500
code
You must sign in to add an answer. If you do not have an account, you can register here