connect office365 group to spo site
3 TopicsMicrosoft Graph API Sharepoint Search
I have written an some python to send a request to the graph API to search a OneDrive for files containing keywords. def get_results(keywords, drive_id, next_url=None, total_results=[]): search_query = ' AND '.join(keywords) top = 500 # Set the desired number of results to retrieve select_properties = "id,name,createdDateTime" # Example properties to select if not next_url: base_search_url = f"https://graph.microsoft.com/v1.0/drives/{drive_id}/root/search(q=\'{search_query}\')" top_search = f"$top={top}" search_url = f"{base_search_url}?{top_search}" else: search_url = next_url headers = { 'Authorization': 'Bearer {}'.format(access_token), 'Content-Type': 'application/json' } response = requests.get(search_url, headers=headers) search_results = response.json() total_results += search_results.get('value', []) if '@odata.nextLink' in search_results: next_url = search_results['@odata.nextLink'] get_results(keywords, drive_id, next_url, total_results) return total_results However, when I run this, the result is that I get around 7k results, but I know for a fact there should be around 10k results. When I search the files in the OneDrive using body: keyword1 AND keyword2 I get all files returned, but with this method using the skip tokens, some files are not returned. On top of this, I also get duplicates, so if the 7k files, only 6k are unique. I'm not sure what I've done wrong with this method, I'm wondering if I could get some assistance on this. Thanks 🙂948Views0likes1CommentLesson Learned #217:Hands-On-Labs:40197-The service has encountered an error processing your request
We used to have cases where our customer faced the following error messages like following: Msg 40197, Level 20, State 4, Line 6 -The service has encountered an error processing your request. Please try again. Error code 9001. Msg 0, Level 20, State 0, Line 3 - A severe error occurred on the current command. The results, if any, should be discarded. In this video below we going to provide us some insights about it.3.9KViews0likes0CommentsConnect office365 group to SPO : Add-PnPOffice365GroupToSite/Set-SPOSiteOffice giving access denied
Hi, I am trying to connect group to a SharePoint online site using these Add-PnPOffice365GroupToSite, Set-SPOSiteOffice365Group commands and getting below error : Access denied. You do not have permission to perform this action or access this resource. Executing these commands with a account which has SP Admin and Exchage admin rights. This error is intermittent and failing few times. When it failed, in the backend the group is getting created but it is not synched with sharepoint. This is my complete command in PNP Add-PnPOffice365GroupToSite -Url $siteURL -DisplayName $GroupDisplayName -Alias $MailNickName -Description $GroupDescription -KeepOldHomePage The same tried with CSOM and getting the same access denied error intermittently tenant.CreateGroupForSite("https://purnam.sharepoint.com/sites/abc1235", "abc1235 ", "abc1235", false, gcParams); Does any one know what could be the issue.? Is there any other alternative to connect the group to SPO site.? Thanks Purna http://moresharepoints.blogspot.com/1.6KViews0likes0Comments