lsc-project / lsc-microsoft-graph-api-plugin Goto Github PK
View Code? Open in Web Editor NEWLSC plugin for using Microsoft Graph API as a source service
License: Other
LSC plugin for using Microsoft Graph API as a source service
License: Other
My customer has multiple instance of graphAPI.
One of them is hosted in China and so has customized endpoints.
It would be nice to have these parameters customized in lsc.xml
I have listed these urls (may be non exhaustive):
in MsGraphApiAuthentication.java, the authentication URL:
WebTarget authTarget = ClientBuilder.newClient()
.register(JacksonFeature.class)
.target("https://login.microsoftonline.com/")
.path(tenant)
.path("oauth2/v2.0/token");
in MsGraphApiDao.java, the users endpoint:
usersClient = client
.target("https://graph.microsoft.com")
.path("v1.0")
.path(USER_PATH);
For the moment, I only consider the need to have the FQDN customizable.
Hi,
MSgraphAPI upgrades recently with new users URI available in order to have new attributes. However, the beginning part of the users URI is hardcoded as /v1.0.
I did a pull request (#5) in order to fix it and to make it fully customizable in usersURL parameter into lsc.xml.
Then if someone want to use it, he has to replace the usersURL parameter by adding v1.0/ in front of it into lsc.xml as written into advanced sample.
With this new URI, new attributes comes with new type of value. Some of theme are LinkedHashMap (name = {childname1=value1, childname2=value2, ... }). This type generates error because he cannot be cast into Set. Here again, the pull request (#5) contains the necessary to manage them in order to retrieve attributes in bean as name/childname1=value1, name/childname2=value2, etc. as explain into readme and in advanced-sample.
Thanks.
Graph API is very poor for filters:
https://docs.microsoft.com/fr-fr/graph/query-parameters#filter-parameter
Note: The following $filter operators are not supported for Azure AD resources: ne, gt, ge, lt, le, and not. The contains string operator is currently not supported on any Microsoft Graph resources.
This is very uncomfortable.
For example, I can't exclude these type of entries from the synchronization:
Feb 24 15:55:50 - ERROR - Error while synchronizing ID {mail=A.N'[email protected]}: org.lsc.exception.LscServiceException: {
"error": {
"code": "BadRequest",
"message": "Invalid filter clause",
"innerError": {
"request-id": "0e8f5835-a894-48e5-99bc-2327bf5205be",
"date": "2020-02-24T14:55:50"
}
}
}
The problem is certainly the quote, but it would be nice to have the LSC going on after such failures.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.