api
89 TopicsPrimer: How to Use RBAC for Applications to Control App Use of the Mail.Send Permission
The temptation to use the Mail.Send application permission in scripts can lead PowerShell developers into trouble because the permission allows access to all mailboxes, including sensitive executive and financial mailboxes. Fortunately, RBAC for Applications allows tenants to control the access that apps have to mailboxes and other Exchange content. All explained here with an example script to test RBAC of Applications. https://office365itpros.com/2026/02/17/mail-send-rbac-for-applications/74Views2likes4CommentsActionable Messages HTTP.Action Returning Error
I have designed a very simple actionable message which looks like this: { "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "body": [ { "type": "ActionSet", "id": "501324c6-5d4b-3867-ad69-bf0e2b1be718", "actions": [ { "type": "Action.Http", "id": "961548cb-862b-161a-3c46-e1265e740b68", "title": "Approve", "url": "MYURL", "method": "GET" } ] } ], "padding": "None", "@type": "AdaptiveCard", "@context": "http://schema.org/extensions" } When I click on the button within Outlook, I get the following error: The remote endpoint returned an error (HTTP 500). Please try again later. I can see that the URL gets called successfully on my side and calling the same URL in the browser also returns fine with a status 200 so I am not sure why I am getting this error. Any ideas? Do I have to format the response in a certain way from my side so that it knows it was successful?2.2KViews2likes2CommentsUnable to update Contact through Azure Graph API
I'm working on an application that reads and updates Contacts from Office 365 through https://msdn.microsoft.com/library/azure/ad/graph/api/contacts-operations#BasicContactOperations. Reading and deleting works fine, however, when I try to update a contact I receive a Bad Request error with the following message: Unable to update the specified properties for objects that have originated within an external service. Don't have a clue what they mean with external service? It doesn't matter if the contact is created through Admin UI or through PowerShell. Can you please let me know if I am missing something here?1.7KViews1like1CommentRest API to get recently modified documents
I am trying to use the delve/rest API to get the recently modified documents for a logged in user. This has worked in the past, but now the results seem to be off. For my user account, it will only return 1 result no matter what I do. This is what I have used in the past: var queryUrl = _spPageContextInfo.webAbsoluteUrl + "/_api/search/query?querytext=%27(*)+AND+(FileExtension:doc+OR+FileExtension:docx+OR+FileExtension:ppt+OR+FileExtension:pptx+OR+FileExtension:xls+OR+FileExtension:xlsx+OR+FileExtension:xlsm+OR+FileExtension:pdf)%27"+ "&SelectProperties='Title,FileExtension,Path,ParentLink,LastModifiedTime,ServerRedirectedURL,SPWebUrl,SiteTitle'"+ "&clienttype='ContentSearchRegular'"+ "&properties=%27GraphQuery:ACTOR(ME\\,action\\:1003),GraphRankingModel:{%22features%22\\:[{%22function%22\\:%22EdgeTime%22}]}%27"+ "&rankingmodelid='0c77ded8-c3ef-466d-929d-905670ea1d72'"+ "&rowlimit=10"; Did something change? Is this endpoint not correct?2.5KViews1like1CommentIt is possible that src param is of type blob or file for view.officeapps.live.com?
Hello, I try to build an "attachment viewer" and for office types I use https://view.officeapps.live.com/op/embed.aspx?src=`${fileUrl}` - Is it possible to use a file or blob instead of a public URL of the file? - If it is impossible to use a file or blob, how could I make this URL much more secure? Great thanks!1.6KViews1like0CommentsMicrosoft Graph API Reports > lots of 504 GatewayTimeout error
Hello, I'm using Microsoft Graph API to download the activity reports from Office 365 ( https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/report ) in a format JSON. But I'm facing an issue : I get a LOT of errors 504 GATEWAYTIMEOUT. I have to try again the request 2 or 3 or 4 or even more times to make it succeed For example : (http 504 GatewayTimeout) Response Error : Endpoint : https://graph.microsoft.com/beta Api Url : /reports/getYammerActivityUserDetail(date=2018-04-16)?$format=application/json&$top=500 Method : GET { "error": { "code": "UnknownError", "message": "", "innerError": { "request-id": "9fdc7b24-2d66-4e9f-92d5-ef281b2ecbc9", "date": "2018-04-18T15:09:06" } } } Is that a known issue , or is there a way to avoid this ? Thank you !4.7KViews1like1Commentconnect-pnpmicrosoftgraph Has Been Deprecated
I have a script that creates an Office 365 group and the associated SharePoint site using PnP PowerShell. I recently updated the SharePointPnPPowerShell assemblies to version 2.20.1711.0. Now I'm getting a warning that connect-pnpmicrosoftgraph has been deprecated and will be removed in April 2018. I have found that connect-pnponline is it's replacement but I'm having trouble connecting. For connect-pnpmicrosoftgraph, I'm using $conn = connect-pnpmicrosoftgraph -AppId $appid -AppSecret $client_secret -AADDomain "mydomain.onmicrosoft.com" -Verbose; When I look at the details of Connect-PnPOnline with Microsoft Graph using Azure Active Directory, I see the same parameters, but running this throws an error connect-pnponline : Value cannot be null. Parameter name: uriString At line:1 char:9 + $conn = connect-pnponline -AppId $appid -AppSecret $client_secret -AA ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Connect-PnPOnline], ArgumentNullException + FullyQualifiedErrorId : System.ArgumentNullException,SharePointPnP.PowerShell.Commands.Base.ConnectOnline Upon further investigation, it appears that AADDomain is incorrect and that I should be using url. But I'm at a loss as to what I'm supposed to use here. I've tried mydomain.onmicrosoft.com, but get an error Connect-PnPOnline : Invalid URI: The format of the URI could not be determined. At line:1 char:1 + Connect-PnPOnline -url "mydomain.onmicrosoft.com" -AppId "xxxxxxx-xxx ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Connect-PnPOnline], UriFormatException + FullyQualifiedErrorId : System.UriFormatException,SharePointPnP.PowerShell.Commands.Base.ConnectOnline So I tried https://mydomain.onmicrosoft.com, but get this error Connect-PnPOnline : Token request failed. At line:1 char:1 + Connect-PnPOnline -url "https://mydomain.onmicrosoft.com" -AppId "xxxx ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Connect-PnPOnline], RequestFailedException + FullyQualifiedErrorId : Microsoft.IdentityModel.SecurityTokenService.RequestFailedException,SharePointPnP.PowerShell.Commands.Base.Conne ctOnline Same when I use https://graph.microsoft.com, and https://mydomain-admin.sharepoint.com Using https://mydomain.sharepoint.com gives me a 403 forbidden error. What is the correct replacement URL for connect-pnpmicrosoftgraph?Solved8.1KViews1like10Comments