Class DirectoryRolesRequestBuilder

java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
com.microsoft.graph.directoryroles.DirectoryRolesRequestBuilder

@Generated("com.microsoft.kiota") public class DirectoryRolesRequestBuilder extends com.microsoft.kiota.BaseRequestBuilder
Provides operations to manage the collection of directoryRole entities.
  • Constructor Details

    • DirectoryRolesRequestBuilder

      public DirectoryRolesRequestBuilder(@Nonnull HashMap<String,Object> pathParameters, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new DirectoryRolesRequestBuilder and sets the default values.
      Parameters:
      pathParameters - Path parameters for the request
      requestAdapter - The request adapter to use to execute the requests.
    • DirectoryRolesRequestBuilder

      public DirectoryRolesRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new DirectoryRolesRequestBuilder and sets the default values.
      Parameters:
      rawUrl - The raw URL to use for the request builder.
      requestAdapter - The request adapter to use to execute the requests.
  • Method Details

    • count

      @Nonnull public CountRequestBuilder count()
      Provides operations to count the resources in the collection.
      Returns:
      a CountRequestBuilder
    • delta

      @Nonnull public DeltaRequestBuilder delta()
      Provides operations to call the delta method.
      Returns:
      a DeltaRequestBuilder
    • getAvailableExtensionProperties

      @Nonnull public GetAvailableExtensionPropertiesRequestBuilder getAvailableExtensionProperties()
      Provides operations to call the getAvailableExtensionProperties method.
      Returns:
      a GetAvailableExtensionPropertiesRequestBuilder
    • getByIds

      @Nonnull public GetByIdsRequestBuilder getByIds()
      Provides operations to call the getByIds method.
      Returns:
      a GetByIdsRequestBuilder
    • validateProperties

      @Nonnull public ValidatePropertiesRequestBuilder validateProperties()
      Provides operations to call the validateProperties method.
      Returns:
      a ValidatePropertiesRequestBuilder
    • byDirectoryRoleId

      @Nonnull public DirectoryRoleItemRequestBuilder byDirectoryRoleId(@Nonnull String directoryRoleId)
      Provides operations to manage the collection of directoryRole entities.
      Parameters:
      directoryRoleId - The unique identifier of directoryRole
      Returns:
      a DirectoryRoleItemRequestBuilder
    • get

      @Nullable public DirectoryRoleCollectionResponse get()
      List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Microsoft Entra admin center, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Microsoft Entra ID, use List directoryRoleTemplates.
      Returns:
      a DirectoryRoleCollectionResponse
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • get

      List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Microsoft Entra admin center, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Microsoft Entra ID, use List directoryRoleTemplates.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a DirectoryRoleCollectionResponse
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • post

      @Nullable public DirectoryRole post(@Nonnull DirectoryRole body)
      Activate a directory role. To read a directory role or update its members, it must first be activated in the tenant. The Company Administrators and the implicit user directory roles (User, Guest User, and Restricted Guest User roles) are activated by default. To access and assign members to other directory roles, you must first activate it with its corresponding directory role template ID.
      Parameters:
      body - The request body
      Returns:
      a DirectoryRole
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • post

      @Nullable public DirectoryRole post(@Nonnull DirectoryRole body, @Nullable Consumer<DirectoryRolesRequestBuilder.PostRequestConfiguration> requestConfiguration)
      Activate a directory role. To read a directory role or update its members, it must first be activated in the tenant. The Company Administrators and the implicit user directory roles (User, Guest User, and Restricted Guest User roles) are activated by default. To access and assign members to other directory roles, you must first activate it with its corresponding directory role template ID.
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a DirectoryRole
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation()
      List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Microsoft Entra admin center, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Microsoft Entra ID, use List directoryRoleTemplates.
      Returns:
      a RequestInformation
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation(@Nullable Consumer<DirectoryRolesRequestBuilder.GetRequestConfiguration> requestConfiguration)
      List the directory roles that are activated in the tenant. This operation only returns roles that have been activated. A role becomes activated when an admin activates the role using the Activate directoryRole API. Not all built-in roles are initially activated. When assigning a role using the Microsoft Entra admin center, the role activation step is implicitly done on the admin's behalf. To get the full list of roles that are available in Microsoft Entra ID, use List directoryRoleTemplates.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • toPostRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPostRequestInformation(@Nonnull DirectoryRole body)
      Activate a directory role. To read a directory role or update its members, it must first be activated in the tenant. The Company Administrators and the implicit user directory roles (User, Guest User, and Restricted Guest User roles) are activated by default. To access and assign members to other directory roles, you must first activate it with its corresponding directory role template ID.
      Parameters:
      body - The request body
      Returns:
      a RequestInformation
    • toPostRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPostRequestInformation(@Nonnull DirectoryRole body, @Nullable Consumer<DirectoryRolesRequestBuilder.PostRequestConfiguration> requestConfiguration)
      Activate a directory role. To read a directory role or update its members, it must first be activated in the tenant. The Company Administrators and the implicit user directory roles (User, Guest User, and Restricted Guest User roles) are activated by default. To access and assign members to other directory roles, you must first activate it with its corresponding directory role template ID.
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • withUrl

      @Nonnull public DirectoryRolesRequestBuilder withUrl(@Nonnull String rawUrl)
      Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
      Parameters:
      rawUrl - The raw URL to use for the request builder.
      Returns:
      a DirectoryRolesRequestBuilder