Closed Agendum closed 5 years ago
The code I believe you are referring to, is just setting the defaults, which are then overwritten with Object.assign()
.
Try this:
graph: {
callAfterInit: true,
endpoints: {
// profile: '/me',
memberGroups: { url: '/me/getMemberGroups', method: 'POST', data: { securityEnabledOnly: true } }
}
}
Please check the relevant section of the documentation for details on how to call the msGraph function and what arguments it accepts. Also as mentioned there, the configuration extends from Axios Request Configuration, so you can add any other options you want for your case (hence the data
property).
Let me know if that works for you.
Ah I completely missed both the 'Object.assign' in the code which I pasted above. Also I missed the Axios comment as well. Sorry for the noise! And thanks for making vue-msal!
I would like to use the graph APIs exposed via vue-msal, but it doesn't support POST-based APIs. For example, the /me/getMemberGroups API (to check for group membership) is a POST-only API, and even has a required body. The current APIs in vue-msal are hard-coded to GET-only:
It would also be nice to do this with the "callAfterInit" feature as well.