Graph API
5 TopicsApplicationAccessPolicy vs Azure Automation Account
Hi all. I have an Azure Automation Account (AAA) with enabled system managed identity. I added Graph API permission Mail.Send (application) to this identity and in script I'm able to send behalf of any email mailboxes. It works correctly. I want to restrict this AAA to specific mailboxes. So, I followed the https://learn.microsoft.com/en-us/graph/auth-limit-mailbox-access. I created Service Principal for AAA by "New-ServicePrincipal" command and created new Application Access Policy. When I test it via Test-ApplicationAccessPolicy command I see correct result. But AAA is still able to send an email behalf of an email mailbox. Do you have the same experience?Solved101Views0likes2CommentsGraph API - Email content is different from raw data
I send an email with dashed item list (put dashes manually without clicking on any buttons): - x - x - x When I afterwards check it in GraphAPI with the command: `https://graph.microsoft.com/v1.0/users/[USER]/messages/[MID]?$select=$value` I receive a correct email body (after manually parsing and un-base64 eml): <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="Generator" content="Microsoft Word 15 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face { font-family: Wingdings; panose-1: 5 0 0 0 0 0 0 0 0 0; } @font-face { font-family: "Cambria Math"; panose-1: 2 4 5 3 5 4 6 3 2 4; } @font-face { font-family: Calibri; panose-1: 2 15 5 2 2 2 4 3 2 4; } /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm; font-size: 11.0pt; font-family: "Calibri", sans-serif; mso-ligatures: standardcontextual; } p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph { mso-style-priority: 34; margin-top: 0cm; margin-right: 0cm; margin-bottom: 0cm; margin-left: 36.0pt; font-size: 11.0pt; font-family: "Calibri", sans-serif; mso-ligatures: standardcontextual; } span.EmailStyle17 { mso-style-type: personal-compose; font-family: "Calibri", sans-serif; color: windowtext; } .MsoChpDefault { mso-style-type: export-only; font-family: "Calibri", sans-serif; } WordSection1 { size: 612.0pt 792.0pt; margin: 72.0pt 72.0pt 72.0pt 72.0pt; } div.WordSection1 { page: WordSection1; } /* List Definitions */ @list l0 { mso-list-id: 1561476882; mso-list-type: hybrid; mso-list-template-ids: -343380202 -1048276170 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693; } @list l0:level1 { mso-level-start-at: 0; mso-level-number-format: bullet; mso-level-text: -; mso-level-tab-stop: none; mso-level-number-position: left; text-indent: -18.0pt; font-family: "Calibri", sans-serif; mso-fareast-font-family: Calibri; } @list l0:level2 { mso-level-number-format: bullet; mso-level-text: o; mso-level-tab-stop: none; mso-level-number-position: left; text-indent: -18.0pt; font-family: "Courier New"; } @list l0:level3 { mso-level-number-format: bullet; mso-level-text: ; mso-level-tab-stop: none; mso-level-number-position: left; text-indent: -18.0pt; font-family: Wingdings; } @list l0:level4 { mso-level-number-format: bullet; mso-level-text: ; mso-level-tab-stop: none; mso-level-number-position: left; text-indent: -18.0pt; font-family: Symbol; } @list l0:level5 { mso-level-number-format: bullet; mso-level-text: o; mso-level-tab-stop: none; mso-level-number-position: left; text-indent: -18.0pt; font-family: "Courier New"; } @list l0:level6 { mso-level-number-format: bullet; mso-level-text: ; mso-level-tab-stop: none; mso-level-number-position: left; text-indent: -18.0pt; font-family: Wingdings; } @list l0:level7 { mso-level-number-format: bullet; mso-level-text: ; mso-level-tab-stop: none; mso-level-number-position: left; text-indent: -18.0pt; font-family: Symbol; } @list l0:level8 { mso-level-number-format: bullet; mso-level-text: o; mso-level-tab-stop: none; mso-level-number-position: left; text-indent: -18.0pt; font-family: "Courier New"; } @list l0:level9 { mso-level-number-format: bullet; mso-level-text: ; mso-level-tab-stop: none; mso-level-number-position: left; text-indent: -18.0pt; font-family: Wingdings; } ol { margin-bottom: 0cm; } ul { margin-bottom: 0cm; } --></style> </head> <body lang="en-IL" link="#0563C1" vlink="#954F72" style="word-wrap:break-word"> <div class="WordSection1"> <ul style="margin-top:0cm" type="disc"> <li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1"><span lang="EN-US">X<o:p></o:p></span></li> <li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1"><span lang="EN-US">X<o:p></o:p></span></li> <li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1"><span lang="EN-US">X<o:p></o:p></span></li> <li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1"><span lang="EN-US">Xx<o:p></o:p></span></li> <li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1"><span lang="EN-US">X<o:p></o:p></span></li> <li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1"><span lang="EN-US">X<o:p></o:p></span></li> </ul> <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> </div> </body> </html> But when I request an email body without select: `https://graph.microsoft.com/v1.0/users/[USER]/messages/[MID]` I receive it different: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="Generator" content="Microsoft Word 15 (filtered medium)"> <style> <!-- @font-face { font-family: Wingdings } @font-face { font-family: "Cambria Math" } @font-face { font-family: Calibri } p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm; font-size: 11.0pt; font-family: "Calibri", sans-serif } p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph { margin-top: 0cm; margin-right: 0cm; margin-bottom: 0cm; margin-left: 36.0pt; font-size: 11.0pt; font-family: "Calibri", sans-serif } span.EmailStyle17 { font-family: "Calibri", sans-serif; color: windowtext } .MsoChpDefault { font-family: "Calibri", sans-serif } WordSection1 { margin: 72.0pt 72.0pt 72.0pt 72.0pt } div.WordSection1 { } ol { margin-bottom: 0cm } ul { margin-bottom: 0cm } --> </style> </head> <body lang="en-IL" link="#0563C1" vlink="#954F72" style="word-wrap:break-word"> <div class="WordSection1"> <ul type="disc" style="margin-top:0cm"> <li class="MsoListParagraph" style="margin-left:0cm"><span lang="EN-US">X</span></li> <li class="MsoListParagraph" style="margin-left:0cm"><span lang="EN-US">X</span></li> <li class="MsoListParagraph" style="margin-left:0cm"><span lang="EN-US">X</span></li> <li class="MsoListParagraph" style="margin-left:0cm"><span lang="EN-US">Xx</span></li> <li class="MsoListParagraph" style="margin-left:0cm"><span lang="EN-US">X</span></li> <li class="MsoListParagraph" style="margin-left:0cm"><span lang="EN-US">X</span></li> </ul> <p class="MsoNormal"><span lang="EN-US"> </span></p> <p class="MsoNormal"><span lang="EN-US"> </span></p> <p class="MsoNormal"><span lang="EN-US"> </span></p></div> </body> </html> There are missing "mso-list:l0 level1 lfo1" styles. When we add some custom content to an email body and update with it an original email (by GraphAPI POST request) it converts dashes list to the bullets list.866Views0likes0Commentsmanage Exchange Online Mail Contacts with Graph API
Has anyone a solution to manage Exchange Online Mail Contacts over Graph API? This would be the preferred way. On Microsoft Learn I've found this https://learn.microsoft.com/en-us/graph/api/resources/orgcontact?view=graph-rest-beta but it's still in beta and can't be used to create Contacts rn. Otherwise, I would try to achieve this with the https://learn.microsoft.com/en-us/powershell/module/exchange/new-mailcontact?view=exchange-ps and Azure Automation. I've never got in touch with Azure Automation but what I've seen, it should be possible, I think.Solved2.8KViews0likes2CommentsExchange online calendar visibility based on group membership
Hi there I'm doing some discovery work on around Exchange online and looking at resource calendars for room booking. I've set up some rooms and want to restrict access to who can book them. I've set up some groups and assigned them to the rooms and if a user tries to book a room which they don't have access to, its declined. However, these rules still show up on Rooms finder. Ideally I'd want to hide rooms which the user can't book from the room - is this possible? If this is possible, does this also extend to using the Graph API? I am looking to integrate Exchange Online with our booking tool and again only want users to be able to see the rooms which they have access to book. Any help would be appreciated! NDGUK1.4KViews0likes3CommentsGraph API access to Exchange Server 2019 hybrid setup (on prem mailbox)
I read within the Microsoft docs (https://docs.microsoft.com/en-us/graph/hybrid-rest-support) that it should be possible to access basic resources like calendar or mail via the Graph API. Behind the scenes, when Microsoft Graph identifies that a REST API call is attempting to access an on-premises mailbox in a hybrid deployment, it proxies the REST request to an on-premises REST endpoint which then processes the request. This discovery makes accessing the REST API possible. We are using a hybrid setup with Exchange Server 2019 and on Prem mailboxes, but unfortunately I'm not able to access any data from there via Graph API.4.3KViews1like1Comment