我正在尝试使用C#创建一个AAD应用程序。
我有两个选择,要么我可以使用:
Microsoft.Azure.ActiveDirectory.GraphClient
Microsoft.Azure.Graph.RBAC
我想知道选择选项1或选项2的优缺点?
有人可以给我一个见解。
我理解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; }
它们都可以用于你。但Microsoft.Azure.Graph.RABC的版本是最新的,最新版本的Microsoft.Azrue.ActiveDirectory.GraphClient是2016年。
此外,Microsoft强烈建议您使用Microsoft Graph而不是Azure AD Graph API来访问Azure Active Directory资源,因此建议您使用this。
有关Microsoft Graph或Azure AD Graph的详细信息,您可以阅读qazxsw poi。