Exemple #1
0
        public O365Graph(GraphAuth auth)
        {
            AuthProvider authProvider = new AuthProvider(auth);

            try
            {
                client = new GraphServiceClient(_accessResourceBaseUrl, authProvider);
            }
            catch (ServiceException se)
            {
                Trace.WriteLine(se.Message);
            }
            catch (Exception ex)
            {
                if (ex.InnerException != null)
                {
                    //You should implement retry and back-off logic per the guidance given here:http://msdn.microsoft.com/en-us/library/dn168916.aspx
                    //InnerException Message will contain the HTTP error status codes mentioned in the link above
                }
            }
        }
Exemple #2
0
 public AuthProvider(GraphAuth auth)
 {
     graphAuth = auth;
 }