az_user {AzureGraph}R Documentation

User in Azure Active Directory

Description

Class representing an AAD user account.

Format

An R6 object of class az_user, inheriting from az_object.

Fields

Methods

Initialization

Creating new objects of this class should be done via the create_user and get_user methods of the ms_graph and az_app classes. Calling the new() method for this class only constructs the R object; it does not call the Microsoft Graph API to create the actual user account.

List methods

All ⁠list_*⁠ methods have filter and n arguments to limit the number of results. The former should be an OData expression as a string to filter the result set on. The latter should be a number setting the maximum number of (filtered) results to return. The default values are filter=NULL and n=Inf. If n=NULL, the ms_graph_pager iterator object is returned instead to allow manual iteration over the results.

Support in the underlying Graph API for OData queries is patchy. Not all endpoints that return lists of objects support filtering, and if they do, they may not allow all of the defined operators. If your filtering expression results in an error, you can carry out the operation without filtering and then filter the results on the client side.

See Also

ms_graph, az_app, az_group, az_device, az_object

Microsoft Graph overview, REST API reference

Examples

## Not run: 

gr <- get_graph_login()

# my user account
gr$get_user()

# another user account
usr <- gr$get_user("myname@aadtenant.com")

grps <- usr$list_direct_memberships()
head(grps)

# owned objects
usr$list_owned_objects()

# owned apps and service principals
usr$list_owned_objects(type=c("application", "servicePrincipal"))

# first 5 objects
usr$list_owned_objects(n=5)

# get the pager object
pager <- usr$list_owned_objects(n=NULL)
pager$value


## End(Not run)

[Package AzureGraph version 1.3.4 Index]