This Adobe CEP extension uses Microsoft's Authentication Library (MSAL) for JavaScript v2.0 to grant Adobe Extensions access to a Microsoft List using the Microsoft Graph API.
This is a proof of concept, meant to be used within the context of a larger suite of extensions.
The extension consists of 3 parts:
- Authorizer Panel for handling MSAL login and Graph requests.
- Node Server running in an invisible extension for serving Authorizer Panel content, communicating with the Authorizer Panel using CEP Events, and exposing an API for other panels to get Graph data using fetch.
- Test Panel to demonstrate data access using the Server API.
Microfoft Code is adapted from here
- Setup your SPA registration. The redirect URI used is localhost:8764/token, and can be changed in authConfig.js.
- Clone the repository into your Adobe extensions folder.
- Run 'npm install' in the /server/js/ directory.
- Enter your client id, tenant id, and redirect Uri in authConfig.js.
- Enter your site id and list id in graphConfig.js. Your list should include a "Title" field for testing with the included Test Panel.
- Enable unsigned Adobe extensions
For more details on the Microsoft MSAL and Graph API see https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-javascript-auth-code
For more details on Adobe CEP Extensions see https://github.com/Adobe-CEP/CEP-Resources/blob/master/CEP_11.x/Documentation/CEP%2011.1%20HTML%20Extension%20Cookbook.md
