UNPKG

@microsoft/msgraph-beta-sdk-users

Version:
98 lines 5.8 kB
import { type PhoneAuthenticationMethod, type PhoneAuthenticationMethodCollectionResponse } from '@microsoft/msgraph-beta-sdk/models/index.js'; import { type CountRequestBuilder } from './count/index.js'; import { type PhoneAuthenticationMethodItemRequestBuilder } from './item/index.js'; import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; /** * Provides operations to manage the phoneMethods property of the microsoft.graph.authentication entity. */ export interface PhoneMethodsRequestBuilder extends BaseRequestBuilder<PhoneMethodsRequestBuilder> { /** * Provides operations to count the resources in the collection. */ get count(): CountRequestBuilder; /** * Provides operations to manage the phoneMethods property of the microsoft.graph.authentication entity. * @param phoneAuthenticationMethodId The unique identifier of phoneAuthenticationMethod * @returns {PhoneAuthenticationMethodItemRequestBuilder} */ byPhoneAuthenticationMethodId(phoneAuthenticationMethodId: string): PhoneAuthenticationMethodItemRequestBuilder; /** * Represents the phone registered to a user for authentication. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {Promise<PhoneAuthenticationMethodCollectionResponse>} * @throws {ODataError} error when the service returns a 4XX or 5XX status code */ get(requestConfiguration?: RequestConfiguration<PhoneMethodsRequestBuilderGetQueryParameters> | undefined): Promise<PhoneAuthenticationMethodCollectionResponse | undefined>; /** * Add a new phone authentication method. 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 preexisting mobile phone will fail. 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 multifactor 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. * @param body The request body * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {Promise<PhoneAuthenticationMethod>} * @throws {ODataError} error when the service returns a 4XX or 5XX status code * @see {@link https://learn.microsoft.com/graph/api/authentication-post-phonemethods?view=graph-rest-beta|Find more info here} */ post(body: PhoneAuthenticationMethod, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<PhoneAuthenticationMethod | undefined>; /** * Represents the phone registered to a user for authentication. * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {RequestInformation} */ toGetRequestInformation(requestConfiguration?: RequestConfiguration<PhoneMethodsRequestBuilderGetQueryParameters> | undefined): RequestInformation; /** * Add a new phone authentication method. 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 preexisting mobile phone will fail. 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 multifactor 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. * @param body The request body * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. * @returns {RequestInformation} */ toPostRequestInformation(body: PhoneAuthenticationMethod, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation; } /** * Represents the phone registered to a user for authentication. */ export interface PhoneMethodsRequestBuilderGetQueryParameters { /** * Include count of items */ count?: boolean; /** * Expand related entities */ expand?: string[]; /** * Filter items by property values */ filter?: string; /** * Order items by property values */ orderby?: string[]; /** * Search items by search phrases */ search?: string; /** * Select properties to be returned */ select?: string[]; /** * Skip the first n items */ skip?: number; /** * Show only the first n items */ top?: number; } /** * Uri template for the request builder. */ export declare const PhoneMethodsRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/authentication/phoneMethods{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}"; /** * Metadata for all the navigation properties in the request builder. */ export declare const PhoneMethodsRequestBuilderNavigationMetadata: Record<Exclude<keyof PhoneMethodsRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata>; /** * Metadata for all the requests in the request builder. */ export declare const PhoneMethodsRequestBuilderRequestsMetadata: RequestsMetadata; //# sourceMappingURL=index.d.ts.map