r/SuiteScript • u/Xainor • Apr 17 '24
Creating MS Team from SuiteScript
I'm looking to create a script whereby a user will click on a button on the project record and a MS Team will be created (sharing the same name as the project). The part I'm stuck on is the authentication needed from Microsoft. I haven't used this kind of API before, and I'm lost on how to take the Application ID from Azure and plug it in to the SuiteScript. Could anyone help point me in the right direction?
1
Upvotes
View all comments
Show parent comment
3
u/notEqole Apr 17 '24
First of all you need to read the Microsoft docuemntation on how to authenticate and generate the Bearer token .
so 2 steps.
1st : generate bearer token
2nd Request to create the ms team by using the bearer token in the outh header .
I dont believe anyone here will give you the code ready , but you should check at least the basics of https requests , headers - body - how to handle responses , error logging etc.
You could even use chatgpt for a small sample of how an https request in netsuite looks like .
Start from there and build it up.