コード例 #1
0
        /// <summary>
        /// Get SP Client Context based on user name and password
        /// </summary>
        public ClientContext GetClientContextWithUserNamePassword(string webUrl, string userName, string password)
        {
            SecureString securePassword = GeneralUtility.ConvertToSecureString(password);

            return(GetClientContextWithUserNamePassword(webUrl, userName, securePassword));
        }
コード例 #2
0
        /// <summary>
        /// Get Delegated access token to AAD with credentials stored in AppSettings
        /// </summary>
        /// <returns></returns>
        public async Task <string> GetGraphApiDelegatedAuthenticationToken()
        {
            string resource = ConfigurationManager.AppSettings["gph:GraphApiTokenResourceUrl"];

            return(await GeneralUtility.GetAzureDelegatedAuthenticationToken(resource, this.TraceWriter));
        }