Class PhoneMethodsRequestBuilder

java.lang.Object
com.microsoft.kiota.BaseRequestBuilder
com.microsoft.graph.users.item.authentication.phonemethods.PhoneMethodsRequestBuilder

@Generated("com.microsoft.kiota") public class PhoneMethodsRequestBuilder extends com.microsoft.kiota.BaseRequestBuilder
Provides operations to manage the phoneMethods property of the microsoft.graph.authentication entity.
  • Constructor Details

    • PhoneMethodsRequestBuilder

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

      public PhoneMethodsRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter)
      Instantiates a new PhoneMethodsRequestBuilder 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
    • byPhoneAuthenticationMethodId

      @Nonnull public PhoneAuthenticationMethodItemRequestBuilder byPhoneAuthenticationMethodId(@Nonnull String phoneAuthenticationMethodId)
      Provides operations to manage the phoneMethods property of the microsoft.graph.authentication entity.
      Parameters:
      phoneAuthenticationMethodId - The unique identifier of phoneAuthenticationMethod
      Returns:
      a PhoneAuthenticationMethodItemRequestBuilder
    • get

      The phone numbers registered to a user for authentication.
      Returns:
      a PhoneAuthenticationMethodCollectionResponse
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • get

      The phone numbers registered to a user for authentication.
      Parameters:
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a PhoneAuthenticationMethodCollectionResponse
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
    • post

      @Nullable public PhoneAuthenticationMethod post(@Nonnull PhoneAuthenticationMethod body)
      Add a new phone authentication method for a user. A user may only have one phone of each type, captured in the phoneType property. This means, for example, adding a mobile phone to a user with a pre-existing mobile phone fails. Additionally, a user must always have a mobile phone before adding an alternateMobile phone. Adding a phone number makes it available for use in both Azure multi-factor authentication (MFA) and self-service password reset (SSPR), if enabled. Additionally, if a user is enabled by policy to use SMS sign-in and a mobile number is added, the system attempts to register the number for use in that system.
      Parameters:
      body - The request body
      Returns:
      a PhoneAuthenticationMethod
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • post

      @Nullable public PhoneAuthenticationMethod post(@Nonnull PhoneAuthenticationMethod body, @Nullable Consumer<PhoneMethodsRequestBuilder.PostRequestConfiguration> requestConfiguration)
      Add a new phone authentication method for a user. A user may only have one phone of each type, captured in the phoneType property. This means, for example, adding a mobile phone to a user with a pre-existing mobile phone fails. Additionally, a user must always have a mobile phone before adding an alternateMobile phone. Adding a phone number makes it available for use in both Azure multi-factor authentication (MFA) and self-service password reset (SSPR), if enabled. Additionally, if a user is enabled by policy to use SMS sign-in and a mobile number is added, the system attempts to register the number for use in that system.
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a PhoneAuthenticationMethod
      Throws:
      ODataError - When receiving a 4XX or 5XX status code
      See Also:
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation()
      The phone numbers registered to a user for authentication.
      Returns:
      a RequestInformation
    • toGetRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toGetRequestInformation(@Nullable Consumer<PhoneMethodsRequestBuilder.GetRequestConfiguration> requestConfiguration)
      The phone numbers registered to a user for authentication.
      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 PhoneAuthenticationMethod body)
      Add a new phone authentication method for a user. A user may only have one phone of each type, captured in the phoneType property. This means, for example, adding a mobile phone to a user with a pre-existing mobile phone fails. Additionally, a user must always have a mobile phone before adding an alternateMobile phone. Adding a phone number makes it available for use in both Azure multi-factor authentication (MFA) and self-service password reset (SSPR), if enabled. Additionally, if a user is enabled by policy to use SMS sign-in and a mobile number is added, the system attempts to register the number for use in that system.
      Parameters:
      body - The request body
      Returns:
      a RequestInformation
    • toPostRequestInformation

      @Nonnull public com.microsoft.kiota.RequestInformation toPostRequestInformation(@Nonnull PhoneAuthenticationMethod body, @Nullable Consumer<PhoneMethodsRequestBuilder.PostRequestConfiguration> requestConfiguration)
      Add a new phone authentication method for a user. A user may only have one phone of each type, captured in the phoneType property. This means, for example, adding a mobile phone to a user with a pre-existing mobile phone fails. Additionally, a user must always have a mobile phone before adding an alternateMobile phone. Adding a phone number makes it available for use in both Azure multi-factor authentication (MFA) and self-service password reset (SSPR), if enabled. Additionally, if a user is enabled by policy to use SMS sign-in and a mobile number is added, the system attempts to register the number for use in that system.
      Parameters:
      body - The request body
      requestConfiguration - Configuration for the request such as headers, query parameters, and middleware options.
      Returns:
      a RequestInformation
    • withUrl

      @Nonnull public PhoneMethodsRequestBuilder 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 PhoneMethodsRequestBuilder