-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
msGraph - post|update requests #41
Comments
I ran into the same problem and overcome it by making a my own I needed to check if a user was a member of a group and achieved this using the Below is a simplified example Vue.use(msal,
{
auth: {
authority: `https://login.microsoftonline.com/${process.env.VUE_APP_AZURE_ACTIVE_DIRECTORY_TENANT_ID}`,
clientId: process.env.VUE_APP_AZURE_STORE_CLIENT_APPLICATION_ID,
redirectUri: `${window.location.origin}/login`,
onToken: (ctx) => {
const groupIds = {groupIds: []}//Group Id's retrieved from config
axios.post(`https://graph.microsoft.com/v1.0/directoryObjects/${ctx.account.accountIdentifier}/checkMemberGroups`,
{ groupIds },
{ headers: {
authorization: `bearer ${ctx.data.accessToken}`,
"access-control-allow-methods": "[POST]",
Accept: "application/json",
"Content-Type": "application/json"
}
}).then(response => {
const groups = response.data.value;
//Add the groups to the user stored in Vuex
});
}
}
}) |
Actually you can add the configurations in your request .Like this: |
$msal
works great for me with Graph connections to get data from Sharepoint.But is there a way how to send a Graph
post
request or at least to use client for Graph post and update request?Thanks.
The text was updated successfully, but these errors were encountered: