
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
microsoft_graph_core
Advanced tools
Get started with the Microsoft Graph Core SDK for Ruby by integrating the Microsoft Graph API into your Ruby application!
Note: Although you can use this library directly, we recommend you use the v1 or beta library which rely on this library and additionally provide a fluent style ruby API and models.
Note: the Microsoft Graph Ruby SDK is currently in Community Preview. During this period we're expecting breaking changes to happen to the SDK based on community's feedback. Checkout the known limitations.
run gem install microsoft_graph_core
or include gem microsoft_graph_core
in your gemfile.
Register your application by following the steps at Register your app with the Microsoft Identity Platform.
An instance of the MicrosoftGraphServiceClient class handles building client. To create a new instance of this class, you need to provide an instance of AuthenticationProvider, which can authenticate requests to Microsoft Graph.
For an example of how to get an authentication provider, see choose a Microsoft Graph authentication provider.
Note: we are working to add the getting started information for Ruby to our public documentation, in the meantime the following sample should help you getting started.
require "microsoft_kiota_authentication_oauth"
require "microsoft_graph_core"
context = MicrosoftKiotaAuthenticationOauth::ClientCredentialContext.new("<the tenant id from your app registration>", "<the client id from your app registration>", "<the client secret from your app registration>")
authentication_provider = MicrosoftGraphCore::Authentication::OAuthAuthenticationProvider.new(context, nil, ["Files.Read"])
You must get a MicrosoftGraphRequestAdapter object to make requests against the service.
require "microsoft_graph"
adapter = MicrosoftGraph::MicrosoftGraphRequestAdapter.new(authentication_provider)
After you have a MicrosoftGraphRequestAdapter that is authenticated, you can begin making calls against the service. The requests against the service look like our REST API.
To retrieve the user's drive:
import "microsoft_kiota_abstractions"
request_information = MicrosoftKiotaAbstractions::RequestInformation.new
request_information.url = "https://graph.microsoft.com/v1.0/me"
result = adapter.send_async(request_information, lambda |pn| { return UserModel.new }, nil, nil).resume
For known issues, see issues.
The Microsoft Graph SDK is open for contribution. To contribute to this project, see Contributing.
Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT license.
FAQs
Unknown package
We found that microsoft_graph_core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.