Yes,
Using the MS GRAPH API [
docs.microsoft.com]
Sample code to list the events:
//
PROCEDURE LIST_EVENTS_MSFT(p_access_token,p_user_id,p_calend)
res_var is Variant
res_var1 is Variant
HTTPTimeOut(600000)
HTTP.IgnoreError = httpIgnoreInvalidCertificate+httpIgnoreInvalidCertificateName+httpIgnoreExpiredCertificate+httpIgnoreRedirectToHTTP+httpIgnoreRedirectToHTTPS
cMyRequest is httpRequest
cMyRequest..URL = "[
graph.microsoft.com];
cMyRequest..Header["Authorization"]="Bearer "+p_access_token
cMyRequest..IgnoreError = httpIgnoreInvalidCertificate+httpIgnoreInvalidCertificateName+httpIgnoreExpiredCertificate+httpIgnoreRedirectToHTTP+httpIgnoreRedirectToHTTPS
cMyRequest..Method=httpGet
cMyResponse is httpResponse = HTTPSend(cMyRequest)
IF ErrorOccurred THEN
Error("Error ",ErrorInfo(errFullDetails))
END
WHEN EXCEPTION IN
res_var=JSONToVariant(cMyResponse..Content)
DO
Info("Error in JSON ",cMyResponse..Content)
RETURN
END
IF res_var.error..Exist THEN
Info("error in result ",cMyResponse..Content)
RETURN
END
FOR i=1 _TO_ res_var.value..Occurrence
res_var1=res_var.value
MOSTRA_RESULTADO=VariantToJSON(res_var1,psdFormatting)
MyWindow..Plane=3
WHILE MyWindow..Plane<>2
Multitask(-1)
CONTINUE
END
END
Regards
Paulo Oliveira