FarmerOAuthTokens.GetAuthenticatedFarmersDetailsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a list of OAuthToken documents.
public virtual Azure.AsyncPageable<BinaryData> GetAuthenticatedFarmersDetailsAsync (System.Collections.Generic.IEnumerable<string> authProviderIds = default, System.Collections.Generic.IEnumerable<string> partyIds = default, bool? isValid = default, DateTimeOffset? minCreatedDateTime = default, DateTimeOffset? maxCreatedDateTime = default, DateTimeOffset? minLastModifiedDateTime = default, DateTimeOffset? maxLastModifiedDateTime = default, int? maxPageSize = default, string skipToken = default, Azure.RequestContext context = default);
abstract member GetAuthenticatedFarmersDetailsAsync : seq<string> * seq<string> * Nullable<bool> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<int> * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetAuthenticatedFarmersDetailsAsync : seq<string> * seq<string> * Nullable<bool> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<int> * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetAuthenticatedFarmersDetailsAsync (Optional authProviderIds As IEnumerable(Of String) = Nothing, Optional partyIds As IEnumerable(Of String) = Nothing, Optional isValid As Nullable(Of Boolean) = Nothing, Optional minCreatedDateTime As Nullable(Of DateTimeOffset) = Nothing, Optional maxCreatedDateTime As Nullable(Of DateTimeOffset) = Nothing, Optional minLastModifiedDateTime As Nullable(Of DateTimeOffset) = Nothing, Optional maxLastModifiedDateTime As Nullable(Of DateTimeOffset) = Nothing, Optional maxPageSize As Nullable(Of Integer) = Nothing, Optional skipToken As String = Nothing, Optional context As RequestContext = Nothing) As AsyncPageable(Of BinaryData)
Parameters
- authProviderIds
- IEnumerable<String>
Name of AuthProvider.
- partyIds
- IEnumerable<String>
List of parties.
- minCreatedDateTime
- Nullable<DateTimeOffset>
Minimum creation date of resource (inclusive).
- maxCreatedDateTime
- Nullable<DateTimeOffset>
Maximum creation date of resource (inclusive).
- minLastModifiedDateTime
- Nullable<DateTimeOffset>
Minimum last modified date of resource (inclusive).
- maxLastModifiedDateTime
- Nullable<DateTimeOffset>
Maximum last modified date of resource (inclusive).
Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.
- skipToken
- String
Skip token for getting next set of results.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The AsyncPageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.
Exceptions
Service returned a non-success status code.
Examples
This sample shows how to call GetAuthenticatedFarmersDetailsAsync and parse the result.
var credential = new DefaultAzureCredential();
var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(<2022-11-01-preview>);
await foreach (var data in client.GetAuthenticatedFarmersDetailsAsync())
{
JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("partyId").ToString());
Console.WriteLine(result.GetProperty("authProviderId").ToString());
}
This sample shows how to call GetAuthenticatedFarmersDetailsAsync with all parameters, and how to parse the result.
var credential = new DefaultAzureCredential();
var client = new FarmBeatsClient(credential).GetFarmerOAuthTokensClient(<2022-11-01-preview>);
await foreach (var data in client.GetAuthenticatedFarmersDetailsAsync(new String[]{"<authProviderIds>"}, new String[]{"<partyIds>"}, true, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, 1234, "<skipToken>"))
{
JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("partyId").ToString());
Console.WriteLine(result.GetProperty("authProviderId").ToString());
Console.WriteLine(result.GetProperty("isValid").ToString());
Console.WriteLine(result.GetProperty("eTag").ToString());
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("modifiedDateTime").ToString());
}
Remarks
Below is the JSON schema for one item in the pageable response.
Response Body:
Schema for OAuthTokenListResponseValue
:
{
partyId: string, # Required. Party ID for this OAuth config.
authProviderId: string, # Required. ID of the OAuth provider resource containing app information.
isValid: boolean, # Optional. An optional flag indicating whether the token is a valid or expired (Default value: true).
eTag: string, # Optional. The ETag value to implement optimistic concurrency.
createdDateTime: string (ISO 8601 Format), # Optional. Date-time when resource was created, sample format: yyyy-MM-ddTHH:mm:ssZ.
modifiedDateTime: string (ISO 8601 Format), # Optional. Date-time when resource was last modified, sample format: yyyy-MM-ddTHH:mm:ssZ.
}
Applies to
Azure SDK for .NET