after execute these code below, the result is the seam:
OfficeRuntime.auth.getAccessToken({forMSGraphAccess: true}).then( function(result) {console.log(result);});
and
Office.context.auth.getAccessTokenAsync(function(result) {
if (result.status === "succeeded") {
console.log(result.value)
} else {
console.log("Error obtaining token", result.error);
}
});
@hello_chenchen both APIs are same. OfficeRuntime.auth.getAccessToken is the newer version and uses promise instead of callback. You can check the documentation for OfficeRuntime.auth.getAccessToken and Office.context.auth.getAccessTokenAsync to see the difference between return type and arguments.