哪个 Nuget 用于创建 AAD 应用程序?

Which Nuget is to be used to create AAD aaplication?

我正在尝试使用 C# 创建 AAD 应用程序。

我有两个选择,我可以使用:

  1. 程序集:

    Microsoft.Azure.ActiveDirectory.GraphClient 
    
  2. 程序集:

    Microsoft.Azure.Graph.RBAC
    

我想知道选择选项 1 或选项 2 的优缺点?

有人可以给我提供见解吗?

两者都可以为您所用。但是Microsoft.Azure.Graph.RABC is much latest, and the latest version of Microsoft.Azrue.ActiveDirectory.GraphClient的版本是2016.

此外,Microsoft 强烈建议您使用 Microsoft Graph 而不是 Azure AD Graph API to access Azure Active Directory resources, so suggest you use this

关于Microsof Graph或Azure AD Graph的详细信息,您可以阅读here

我知道 Microsoft.Azure.Graph.RABC 是最新的,但我仍然建议使用 Microsoft.Azrue.ActiveDirectory.GraphClient,因为它在创建应用程序时包含更多参数。因此,您将有更多可用的自定义选项。

        public IList<ExtensionProperty> ExtensionProperties { get; set; }
        public string SamlMetadataUrl { get; set; }
        public IList<RequiredResourceAccess> RequiredResourceAccess { get; set; }
        public IList<string> ReplyUrls { get; set; }
        public string RecordConsentConditions { get; set; }
        public bool? PublicClient { get; set; }
        public IList<PasswordCredential> PasswordCredentials { get; set; }
        public bool Oauth2RequirePostResponse { get; set; }
        public IList<OAuth2Permission> Oauth2Permissions { get; set; }
        public bool Oauth2AllowUrlPathMatching { get; set; }
        public bool Oauth2AllowImplicitFlow { get; set; }
        public string LogoutUrl { get; set; }
        public IList<Guid> KnownClientApplications { get; set; }
        public IList<KeyCredential> KeyCredentials { get; set; }
        public IList<string> IdentifierUris { get; set; }
        public string Homepage { get; set; }
        public string GroupMembershipClaims { get; set; }
        public string ErrorUrl { get; set; }
        public string DisplayName { get; set; }
        public bool? AvailableToOtherTenants { get; set; }
        public IList<AppRole> AppRoles { get; set; }
        public string AppId { get; set; }
        public IList<AddIn> AddIns { get; set; }
        public IList<DirectoryObject> Policies { get; set; }
        public IList<ServiceEndpoint> ServiceEndpoints { get; set; }