Tag: azure ad graph api

Microsoft Graph API:获取文件列表API,给出空数组

我尝试了API来获取iOS SDK中的文件。 我已经注册了所有范围的应用程序读取/读取文件访问应用程序。 我能够成功地使用示例代码发送邮件。 我在图表资源pipe理器中尝试了API https://graphexplorer2.azurewebsites.net/?UrlRequest=GET&text=https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fme%2Fdrive%2Froot%2Fchildren 请求摘录: AuthenticationManager *authManager = [AuthenticationManager sharedInstance]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://graph.microsoft.com/v1.0/me/drive/root/children"]]; [request setHTTPMethod:@"GET"]; [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [request setValue:@"application/json, text/plain, */*" forHTTPHeaderField:@"Accept"]; NSString *authorization = [NSString stringWithFormat:@"Bearer %@", authManager.accessToken]; [request setValue:authorization forHTTPHeaderField:@"Authorization"]; NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:request delegate:self]; if(conn) { NSLog(@"Connection Successful"); } else { NSLog(@"Connection could […]