does anyone already worked upon <https://learn.mic...
# cfml-beginners
s
m
What exactly are you asking? Has anyone utilized Microsoft's Graph API? Has anyone utilized Microsoft's Graph API with ColdFusion?
The Graph API is pretty easy and just is a REST API with some authorization in front of it.
s
its specific the outlook calendar API, i am not at this point sure if its connected with graph or not, but i am asking is if anyone already utilized it, i can reuse else i have to reinvent
e
I used graph and teams to send out messages in teams, The method though is like most of my code, unorthodox as hell.
Anyways, generic code but first you connect using something like this : <cfhttp url="https://login.microsoftonline.com/{your_tenant_id}/oauth2/v2.0/token" method="post"> <cfhttpparam type="formfield" name="client_id" value="{your_application_id}" /> <cfhttpparam type="formfield" name="client_secret" value="{your_application_secret}" /> <cfhttpparam type="formfield" name="grant_type" value="client_credentials" /> <cfhttpparam type="formfield" name="scope" value="https://graph.microsoft.com/.default" /> </cfhttp> <cfset response = deserializeJSON(cfhttp.filecontent)> <cfset access_token = response.access_token> now to look at the person you want to see, youw ould just replace the email address. with something like this : <cfhttp url="https://graph.microsoft.com/v1.0/users/example@foo.loo/calendar" method="get"> <cfhttpparam type="header" name="Authorization" value="Bearer #access_token#" /> </cfhttp> <cfset calendar = deserializeJSON(cfhttp.filecontent)>
w
@leonod To Graph or not to Graph ;)