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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThe phone numbers registered to a user for authentication.classConfiguration for the request such as headers, query parameters, and middleware options.classConfiguration for the request such as headers, query parameters, and middleware options. -
Field Summary
Fields inherited from class com.microsoft.kiota.BaseRequestBuilder
pathParameters, requestAdapter, urlTemplate -
Constructor Summary
ConstructorsConstructorDescriptionPhoneMethodsRequestBuilder(String rawUrl, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newPhoneMethodsRequestBuilderand sets the default values.PhoneMethodsRequestBuilder(HashMap<String, Object> pathParameters, com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newPhoneMethodsRequestBuilderand sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionbyPhoneAuthenticationMethodId(String phoneAuthenticationMethodId) Provides operations to manage the phoneMethods property of the microsoft.graph.authentication entity.count()Provides operations to count the resources in the collection.get()The phone numbers registered to a user for authentication.get(Consumer<PhoneMethodsRequestBuilder.GetRequestConfiguration> requestConfiguration) The phone numbers registered to a user for authentication.Add a new phone authentication method for a user.post(PhoneAuthenticationMethod body, Consumer<PhoneMethodsRequestBuilder.PostRequestConfiguration> requestConfiguration) Add a new phone authentication method for a user.com.microsoft.kiota.RequestInformationThe phone numbers registered to a user for authentication.com.microsoft.kiota.RequestInformationtoGetRequestInformation(Consumer<PhoneMethodsRequestBuilder.GetRequestConfiguration> requestConfiguration) The phone numbers registered to a user for authentication.com.microsoft.kiota.RequestInformationAdd a new phone authentication method for a user.com.microsoft.kiota.RequestInformationtoPostRequestInformation(PhoneAuthenticationMethod body, Consumer<PhoneMethodsRequestBuilder.PostRequestConfiguration> requestConfiguration) Add a new phone authentication method for a user.Returns a request builder with the provided arbitrary URL.
-
Constructor Details
-
PhoneMethodsRequestBuilder
public PhoneMethodsRequestBuilder(@Nonnull HashMap<String, Object> pathParameters, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newPhoneMethodsRequestBuilderand sets the default values.- Parameters:
pathParameters- Path parameters for the requestrequestAdapter- The request adapter to use to execute the requests.
-
PhoneMethodsRequestBuilder
public PhoneMethodsRequestBuilder(@Nonnull String rawUrl, @Nonnull com.microsoft.kiota.RequestAdapter requestAdapter) Instantiates a newPhoneMethodsRequestBuilderand 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
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
@Nullable public PhoneAuthenticationMethodCollectionResponse get(@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
PhoneAuthenticationMethodCollectionResponse - Throws:
ODataError- When receiving a 4XX or 5XX status code
-
post
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 bodyrequestConfiguration- 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 bodyrequestConfiguration- Configuration for the request such as headers, query parameters, and middleware options.- Returns:
- a
RequestInformation
-
withUrl
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
-