Configure connection to external data in Sharepoint

Copper Contributor

Hello!

I want to create a list on my Sharepoint Online 365 by connecting to an API of a system where I will get all the registration information of my employees, then I will use this list as a data source in an application on PowerApps. How do I set up this connection to external data in Sharepoint?

8 Replies

@leandrosg you would need to use Power Automate with a custom connection if there is no ready-built connector for the system that holds your registration information. That flow could get the registration data and populate the SharePoint list which could then be the data source for your app in Power Apps. 

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@leandrosg To set up connection so that SharePoint data can be accessible from external connection, I have written a blog, please check below link:

https://www.c-sharpcorner.com/blogs/setting-for-sharepoint-online-to-accessible-from-external-enviro...

 

 

@Ashish_Kohale 

First of all congratulations on the blog, but I couldn't get past the xml permission part

Failing to create.

 

leandrosg_0-1591408579336.png

 

@leandrosg : It seems you need tenant level permission to trust this app. This granting can only be done via the appinv.aspx page on the tenant administration site. You can reach this site via https://tenantName-admin.sharepoint.com/_layouts/appinv.aspx. Once the page is loaded add your client id and look up the created principal.

 

Use below XML to get the full control permission for the APP.

Spoiler
<AppPermissionRequests AllowAppOnlyPolicy="true"> <AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" /> </AppPermissionRequests>

 

When you click on Create you'll be presented with a permission consent dialog. Press Trust It to grant the permissions

 

 

@Ashish_Kohale 

I did all the steps, but it didn't work.
When I am going to generate the Sharepoint api website it presents the following error:
"error_description": "Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown."

print_error.PNG

 

@leandrosg : Check the API, it should be this format: https://<sitename>.sharepoint.com/_api/web?$select=Title

 

You have used _layout/15/, should not be part of API URL.

 

@Ashish_Kohale  I put the url as your indication and the error continues.

 

PrintError2.PNG

@leandrosg : Hope you are changing the authorization token after token_type "Bearer" which generated from below API:

https://accounts.accesscontrol.windows.net/<TenantID>/tokens/OAuth/2