Class SubjectLookupRequestBuilder

java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.graph.subjectlookup.SubjectLookupRequestBuilder

public class SubjectLookupRequestBuilder extends BaseRequestBuilder
Provides functionality to work with Graph Subject Lookup Api.
  • Constructor Details

    • SubjectLookupRequestBuilder

      public SubjectLookupRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential)
      Instantiates a new RequestBuilder instance and sets the default values.
      Parameters:
      organizationUrl - Represents organization location request url.
      accessTokenCredential - Access token credential object.
  • Method Details

    • lookupAsync

      public CompletableFuture<SubjectLookupResponse> lookupAsync(GraphSubjectLookup subjectLookup) throws AzDException
      Resolve descriptors to users, groups or scopes (Subjects) in a batch.
      Parameters:
      subjectLookup - Subject lookup object that contains list of descriptor to look for.
      Example:
      
       var subjectLookup = new GraphSubjectLookup();
       var subjectLookupKeys = new ArrayList<GraphSubjectLookupKey>();
       subjectLookupKeys.add(new GraphSubjectLookupKey("aadgp.Uy0xLTktMTU1MTM3NDI0NS0xMjA0NDAwOTY5LTI0MDI5ODY0MTMtMjE3OTQwODYxNi0zLTE5MTI3MjIxNjAtMjUyNDcwNjM3MC0yNDg2NjA0ODIwLTg2MjI3NjQyNA"));
       subjectLookupKeys.add(new GraphSubjectLookupKey("aad.NjJhOWYxYmQtNmEwOS03NjQyLTkzYTAtMDFkMTVmZDQ2NDk4"));
       subjectLookup.setLookupKeys(subjectLookupKeys)
       
      Returns:
      Subject lookup response SubjectLookupResponse
      Throws:
      AzDException - Default Api Exception handler.
    • lookup

      public SubjectLookupResponse lookup(GraphSubjectLookup subjectLookup) throws AzDException
      Resolve descriptors to users, groups or scopes (Subjects) in a batch.
      Parameters:
      subjectLookup - Subject lookup object that contains list of descriptor to look for.
      Example:
      
       var subjectLookup = new GraphSubjectLookup();
       var subjectLookupKeys = new ArrayList<GraphSubjectLookupKey>();
       subjectLookupKeys.add(new GraphSubjectLookupKey("aadgp.Uy0xLTktMTU1MTM3NDI0NS0xMjA0NDAwOTY5LTI0MDI5ODY0MTMtMjE3OTQwODYxNi0zLTE5MTI3MjIxNjAtMjUyNDcwNjM3MC0yNDg2NjA0ODIwLTg2MjI3NjQyNA"));
       subjectLookupKeys.add(new GraphSubjectLookupKey("aad.NjJhOWYxYmQtNmEwOS03NjQyLTkzYTAtMDFkMTVmZDQ2NDk4"));
       subjectLookup.setLookupKeys(subjectLookupKeys)
       
      Returns:
      Subject lookup response SubjectLookupResponse
      Throws:
      AzDException - Default Api Exception handler.