The repository contains SharePoint Framework solution demonstrates how to use LMS365 API using modern SharePoint web parts.
- Please checkout SharePoint framework documentation and make sure you setup dev environment for SPFx solutions.
- Clone this repository
Access to LMS365 API should be configured using package-solution.json
-
You need to open
https://portal.azure.com > Azure Active Directory > Enterprise Applicationsand search lms365 api application. it could be found by one of two search criterias:lms365-api-prodorLMS365 API
OR
-
Once application found copy the name
lms365-api-prodorLMS365 API -
Open
repository-folder/config/package-solution.jsonand make sure that sectionwebApiPermissionRequestshas right name of resource from previous step
"webApiPermissionRequests": [
{
"resource": "LMS365 API", //or "lms365-api-prod"
"scope": "user_impersonation"
}
]cd repository-folder
npm i
gulp bundle
gulp package-solution
gulp serve- Upload the package file from
repository-folder\sharepoint\solution\lms365-spfx-samples.sppkgto the SharePoint app catalog - Once package is uploaded you need to approve LMS365 API permission request. It could be done using steps from documentation
the request is approved one time. After request is approved web part will able to connect to the LMS365 API and ready to run.
- Open any modern site you have admin access to and then navigate to hosted workbench
https://contoso.sharepoint.com/sites/modernsite/_layouts/15/workbench.aspx
IMPORTANT: workbench should be hosted and NOT localhost based - On the page you can add
lms365-statisticsweb part it should look like that
IMAGE


