Andrey
Andrey

Reputation: 21275

Authenticating a background app with Microsoft Graph

I need to build a background service (running on a schedule on a linux box) that would pull events from a 3rd party calendar and add them into a Office 365 account calendar.

I am stuck on authentication piece. Reading https://learn.microsoft.com/en-us/graph/auth-v2-service?view=graph-rest-1.0 I get to where I configure a platform for my app. If I select "Web" as the article suggests, I need to provide a callback URL to get the token, but my service doesn't expose any URL endpoints so there is no callback URL to provide.

How do I approach authentication of my service with Microsoft Graph?

Upvotes: 0

Views: 401

Answers (1)

FerronSW
FerronSW

Reputation: 535

It's a bit strange, but you have to fill the callback URL. Because you use Application Permissions you can fill it with whatever you want (valid uri)!

Like https://mybackgroundapp.com

If you're not using any of Microsoft Graph libraries you can use this to obtain a token.

Upvotes: 1

Related Questions