Comments (6)
Hi Diane. Sorry this was my fault. I had not properly configured the callback endpoint, and so i was getting 400 bad request in debug, which made me beleive it a bug, but its just me being dumb. I realized only late last night and did no5 update/close this issue.
thanks for letting me know apponly is available on beta version.
By the way, i just want to say that the work you guys are doing there is amazing! The additional functionality you guys are building into graphapi is super powerful and impressive. Everytime i look and see new functionality and im like wow, these guys are really going for it. Thanks for all your hard work and thanks for keeping track of all these github repos.
cheers
from aspnet-webhooks-rest-sample.
Hi @nigel-dewar . Thanks for reporting this issue. Looking into it now.
from aspnet-webhooks-rest-sample.
Hi @nigel-dewar . App-only is supported on /beta.
Can you please provide your error message and the response headers (especially the request ID and date) for the create-subscription request? Also, was your callback endpoint ever called during the attempt?
from aspnet-webhooks-rest-sample.
Hi There , I have ensured that I have things correct, have obtained an App-only token for graph ap successfully, however it seems beta webhooks do not work.
FYI, I have given my application ALL rights in AZURE AD for Graph and Exchange endpoints, so no permission issues there.
I have correctly configured the ngrok return endpoint, that also is not an issue, and have tested that when I use a user (delegated token), things work just fine.
So here is what I have done and which should work but does not.
I obtain my app-only access token, And I go to create a subscription using my token as shown here
string subscriptionsEndpoint = "https://graph.microsoft.com/beta/subscriptions/";
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, subscriptionsEndpoint);
var subscription = new Subscription
{
Resource = "users/" + user.UserPrincipleName + "/mailFolders('Inbox')/messages",
ChangeType = "created",
NotificationUrl = ConfigurationManager.AppSettings["ida:NotificationUrl"],
ClientState = Guid.NewGuid().ToString(),
ExpirationDateTime = DateTime.UtcNow + new TimeSpan(0, 0, 4230, 0)
};
Notice that I have set the subscriptionsEndpoint to use the /beta/ version
Also please notice that I have set the Resource to use
Resource = "users/" + user.UserPrincipleName + "/mailFolders('Inbox')/messages" >> user.UserPrincipleName being the users email box I want to listen to
All should work, however I dont even get past base 1. I am getting 401 Unauthorized as a response when trying to post subscription request through.
Can anyone please shed some light on what I might be doing wrong. Cheers
from aspnet-webhooks-rest-sample.
Hi @nigel-dewar . Can you please provide us with the raw response, making sure to include the request ID and date? Then the product team can start investigating. If you use Fiddler, you can see this in the Raw tab of the response.
from aspnet-webhooks-rest-sample.
Hi @DianeD , I'm very sorry but I figured out what the issue was at 11pm last night. I had stupidly created the app only token using the service endpoint for outlook.com and not graph.microsoft.com!!!
When I realized I was like "OMG! How completely idiotic am I" !!!
Sorry to waste your time..... again.
Cheers, Nige
from aspnet-webhooks-rest-sample.
Related Issues (19)
- Client sometimes does not update HOT 1
- Cannot build project - NuGet packages won't restore
- AcquireTokenByRefreshTokenAsync is removed HOT 3
- Subscription error HOT 1
- impersonation HOT 1
- Microsoft Graph - Asp.net Webhooks Rest Sample - Subscription response error HOT 2
- Microsoft Graph ASPNET Webhooks code sample works on ngrok but not on azure HOT 1
- what kind of permission need to set for this application ? HOT 1
- An error occurred while processing your request. HOT 5
- Create; Exception: [A task was canceled.] Inner error HOT 1
- Issue while sign-in to application on organization id HOT 2
- Not getting any callbacks HOT 1
- Sample does not work HOT 1
- Broken links HOT 1
- Fobidden error HOT 7
- Confusing/erroneous instructions, plus sign-in loop HOT 3
- Microsoft Graph is not sending notifications HOT 3
- Subscription validation request timed out HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnet-webhooks-rest-sample.