View source: R/zzz_class_directory.R
register_graph_class | R Documentation |
Extensible registry of Microsoft Graph classes that AzureGraph supports
register_graph_class(name, R6_generator, check_function)
name |
The name of the Graph class, eg "user", "servicePrincipal", etc. |
R6_generator |
An R6 class generator corresponding to this Graph class. |
check_function |
A boolean function that checks if a list of properties is for an object of this class. |
As written, AzureGraph knows about a subset of all the object classes contained in Microsoft Graph. These are mostly the classes originating from Azure Active Directory: users, groups, app registrations, service principals and registered devices.
You can extend AzureGraph by writing your own R6 class that inherits from ms_object
. If so, you should also register your class by calling register_graph_class
and providing the generator object, along with a check function. The latter should accept a list of object properties (as obtained from the Graph REST API), and return TRUE/FALSE based on whether the object is of your class.
An invisible vector of registered class names.
## Not run:
# built-in 'az_user' class, for an AAD user object
register_graph_class("user", az_user,
function(props) !is.null(props$userPrincipalName))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.