az_service_principal: Service principal in Azure Active Directory

az_service_principalR Documentation

Service principal in Azure Active Directory


Class representing an AAD service principal.


An R6 object of class az_service_principal, inheriting from az_object.


  • token: The token used to authenticate with the Graph host.

  • tenant: The Azure Active Directory tenant for this service principal.

  • type: always "service principal" for a service principal object.

  • properties: The service principal properties.


  • new(...): Initialize a new service principal object. Do not call this directly; see 'Initialization' below.

  • delete(confirm=TRUE): Delete a service principal. By default, ask for confirmation first.

  • update(...): Update the service principal information in Azure Active Directory.

  • do_operation(...): Carry out an arbitrary operation on the service principal.

  • sync_fields(): Synchronise the R object with the service principal data in Azure Active Directory.


Creating new objects of this class should be done via the create_service_principal and get_service_principal 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 service principal.

See Also

ms_graph, az_app, az_object

Azure Microsoft Graph overview, REST API reference

AzureGraph documentation built on March 18, 2022, 8:04 p.m.