How to call Post and Patch request for Microsoft Graph through dot net core code
up vote
0
down vote
favorite
I have already written the code for get all users method in dot net core that will get all users details from Microsoft Graph API. But i am unable to create/update/delete users through Microsoft graph API.
I am using
Uri Uri = new Uri("https://graph.microsoft.com/v1.0/users");
var httpResult = httpClient.GetStringAsync(Uri).Result;
for get all users.
microsoft-graph
add a comment |
up vote
0
down vote
favorite
I have already written the code for get all users method in dot net core that will get all users details from Microsoft Graph API. But i am unable to create/update/delete users through Microsoft graph API.
I am using
Uri Uri = new Uri("https://graph.microsoft.com/v1.0/users");
var httpResult = httpClient.GetStringAsync(Uri).Result;
for get all users.
microsoft-graph
1
Welcome to Stack Overflow! I strongly recommend reading "How do I ask a good question?" for some tips on getting started. Your question, as it stands today, is really broad and doesn't include any examples of what you have already tried and what errors/blockers you encountered.
– Marc LaFleur
Nov 9 at 16:56
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have already written the code for get all users method in dot net core that will get all users details from Microsoft Graph API. But i am unable to create/update/delete users through Microsoft graph API.
I am using
Uri Uri = new Uri("https://graph.microsoft.com/v1.0/users");
var httpResult = httpClient.GetStringAsync(Uri).Result;
for get all users.
microsoft-graph
I have already written the code for get all users method in dot net core that will get all users details from Microsoft Graph API. But i am unable to create/update/delete users through Microsoft graph API.
I am using
Uri Uri = new Uri("https://graph.microsoft.com/v1.0/users");
var httpResult = httpClient.GetStringAsync(Uri).Result;
for get all users.
microsoft-graph
microsoft-graph
edited Nov 9 at 18:14
James Z
11.1k71735
11.1k71735
asked Nov 9 at 12:26
sudhanshu Pal
124
124
1
Welcome to Stack Overflow! I strongly recommend reading "How do I ask a good question?" for some tips on getting started. Your question, as it stands today, is really broad and doesn't include any examples of what you have already tried and what errors/blockers you encountered.
– Marc LaFleur
Nov 9 at 16:56
add a comment |
1
Welcome to Stack Overflow! I strongly recommend reading "How do I ask a good question?" for some tips on getting started. Your question, as it stands today, is really broad and doesn't include any examples of what you have already tried and what errors/blockers you encountered.
– Marc LaFleur
Nov 9 at 16:56
1
1
Welcome to Stack Overflow! I strongly recommend reading "How do I ask a good question?" for some tips on getting started. Your question, as it stands today, is really broad and doesn't include any examples of what you have already tried and what errors/blockers you encountered.
– Marc LaFleur
Nov 9 at 16:56
Welcome to Stack Overflow! I strongly recommend reading "How do I ask a good question?" for some tips on getting started. Your question, as it stands today, is really broad and doesn't include any examples of what you have already tried and what errors/blockers you encountered.
– Marc LaFleur
Nov 9 at 16:56
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
According to your description, I assume you want to create/delete/update a user using the MS Graph API.
We can refer to this document to create/delete/update the user.
Using the endpoint POST /users to create a user.
Using the endpoint PATCH /users/ userPrincipalName to update a user.
Using the endpoint DELETE /users/ userPrincipalName to delete a user.
First of all, we should have grant the permission for you application.
Yes, i have resolved the permission thing from Admin. Now, it's working fine.
– sudhanshu Pal
Nov 12 at 11:51
Please provide me sample for patch request for console application.
– sudhanshu Pal
yesterday
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
According to your description, I assume you want to create/delete/update a user using the MS Graph API.
We can refer to this document to create/delete/update the user.
Using the endpoint POST /users to create a user.
Using the endpoint PATCH /users/ userPrincipalName to update a user.
Using the endpoint DELETE /users/ userPrincipalName to delete a user.
First of all, we should have grant the permission for you application.
Yes, i have resolved the permission thing from Admin. Now, it's working fine.
– sudhanshu Pal
Nov 12 at 11:51
Please provide me sample for patch request for console application.
– sudhanshu Pal
yesterday
add a comment |
up vote
0
down vote
accepted
According to your description, I assume you want to create/delete/update a user using the MS Graph API.
We can refer to this document to create/delete/update the user.
Using the endpoint POST /users to create a user.
Using the endpoint PATCH /users/ userPrincipalName to update a user.
Using the endpoint DELETE /users/ userPrincipalName to delete a user.
First of all, we should have grant the permission for you application.
Yes, i have resolved the permission thing from Admin. Now, it's working fine.
– sudhanshu Pal
Nov 12 at 11:51
Please provide me sample for patch request for console application.
– sudhanshu Pal
yesterday
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
According to your description, I assume you want to create/delete/update a user using the MS Graph API.
We can refer to this document to create/delete/update the user.
Using the endpoint POST /users to create a user.
Using the endpoint PATCH /users/ userPrincipalName to update a user.
Using the endpoint DELETE /users/ userPrincipalName to delete a user.
First of all, we should have grant the permission for you application.
According to your description, I assume you want to create/delete/update a user using the MS Graph API.
We can refer to this document to create/delete/update the user.
Using the endpoint POST /users to create a user.
Using the endpoint PATCH /users/ userPrincipalName to update a user.
Using the endpoint DELETE /users/ userPrincipalName to delete a user.
First of all, we should have grant the permission for you application.
answered Nov 12 at 2:10
kikang
59716
59716
Yes, i have resolved the permission thing from Admin. Now, it's working fine.
– sudhanshu Pal
Nov 12 at 11:51
Please provide me sample for patch request for console application.
– sudhanshu Pal
yesterday
add a comment |
Yes, i have resolved the permission thing from Admin. Now, it's working fine.
– sudhanshu Pal
Nov 12 at 11:51
Please provide me sample for patch request for console application.
– sudhanshu Pal
yesterday
Yes, i have resolved the permission thing from Admin. Now, it's working fine.
– sudhanshu Pal
Nov 12 at 11:51
Yes, i have resolved the permission thing from Admin. Now, it's working fine.
– sudhanshu Pal
Nov 12 at 11:51
Please provide me sample for patch request for console application.
– sudhanshu Pal
yesterday
Please provide me sample for patch request for console application.
– sudhanshu Pal
yesterday
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53225697%2fhow-to-call-post-and-patch-request-for-microsoft-graph-through-dot-net-core-code%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Welcome to Stack Overflow! I strongly recommend reading "How do I ask a good question?" for some tips on getting started. Your question, as it stands today, is really broad and doesn't include any examples of what you have already tried and what errors/blockers you encountered.
– Marc LaFleur
Nov 9 at 16:56