Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
microsoft_graph_beta
Advanced tools
Get started with the Microsoft Graph Beta SDK for Ruby by integrating the Microsoft Graph API into your Ruby application!
Note: this SDK allows you to build applications using the beta of Microsoft Graph. If you want to use the production supported Microsoft Graph APIs under v1.0, use our v1.0 SDK instead.
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_beta
or include gem microsoft_graph_beta
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 MicrosoftGraphServiceClient object to make requests against the service.
require "microsoft_graph_beta"
adapter = MicrosoftGraphBeta::MicrosoftGraphRequestAdapter.new(authentication_provider)
client = MicrosoftGraphBeta::MicrosoftGraphServiceClient.new(adapter)
After you have a MicrosoftGraphServiceClient 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:
result = client.me.drive.get.resume
puts "Found Drive : " + result.id
Automatic paging is currently not supported with the Ruby SDK, we're working to enable this feature.
For more detailed documentation, see:
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_beta demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.