So, I'm trying to use the Bookings APIs in Office 365. Unfortunately, the only permissions available for Bookings are delegated, so I have to use a username and password as well as a client ID and secret.
I noticed this old post saying something should be added, but I'm on 3.8 and not seeing much around how to use O365 authentication.
I can get a token in Postman if I HTTP POST to https://login.microsoftonline.com/MyTenantID/oauth2/v2.0/token
and if I pass in the body:
grant_type = password
client_id = myclientID
client_secret = mysecret
scope = https://graph.microsoft.com/.default
username = A user that can use MS Bookings
password = that user's password.
I can then use that auth token to do a HTTP GET on https://graph.microsoft.com/beta/bookingBusinesses/Bookingemailaddress@mytenant.onmicrosoft.com/appointments
And that gets me appointments.
I was trying to do a HTTP POST to the token endpoint with authentication "none" and just pass the parameters along in the payload, but the payload never seems to accept or take the client_id because it seems hard coded to expect that in the OAuth.
So, out of curiosity, anyone have any tips to authenticate against O365 with a rest call to do stuff?