I've crawled though as much documentation as I can find but I'm unable to find a swagger file for https://graph.microsoft.io/
There appear to be a couple of variations on this API and I've seen references to the Office 365 Graph API and Azure Graph API but I believe that Microsoft Graph is that latest unified version and provides the features I'm after.
I'd like to use the with Microsoft Flow and I was surprised that it wasn't integrated as an API out of the box. To register a Custom API with Flow however you need to provide a swagger file, hence the question.
Graph Explorer is a web-based tool that you can use to build and test requests using Microsoft Graph APIs. You can access Graph Explorer at: https://developer.microsoft.com/graph/graph-explorer.
Azure Active Directory (Azure AD) Graph is deprecated and will be retired at any time after June 30, 2023, without advance notice, as we announced in September, 2022.
We have some datasets available for free or are currently free in preview while other datasets are charged. Microsoft Graph Data Connect offers datasets across multiple different Microsoft 365 products and services.
I found something to convert between OData XML metadata to swagger. https://github.com/akorchev/odata2openapi
The msgraph metadata for beta is at https://graph.microsoft.com/beta/$metadata.
For TypeScript, you would do something like this:
import { odata2openapi } from 'odata2openapi';
odata2openapi('https://graph.microsoft.com/beta/$metadata')
.then(swagger => console.log(JSON.stringify(swagger, null, 2)))
.catch(error => console.error(error))
UPDATE: I noticed there was an error when trying it. I believe because the code did not handle when EntityType node did not have any Properties nodes. I put in a pull request to fix that. https://github.com/akorchev/odata2openapi/pull/7
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With