Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
elena_itlogistics  
#1 Posted : Monday, August 21, 2023 4:27:54 AM(UTC)
elena_itlogistics

Rank: Newbie

Groups: Registered
Joined: 8/21/2023(UTC)
Posts: 1
Russian Federation
Location: Moscow

My desktop application needs to download mail from an office 365. I am trying to connect to the server using the code (VBS) from the documentation (protocol - MailServerEWS, authorization type - MailServerAuthXOAUTH2) by userEmail and accessToken. The server returns a 403 Server Error. Access and roles office 365 are administered by the client. AccessToken obtained using tenantid and client_secret has the following structure
{
"aud": "https://outlook.office365.com",
"iss": "https://sts.windows.net/********-****-****-****-************/",
"iat": 1692274954,
"nbf": 1692274954,
"exp": 1692278854,
"aio": "E2FgYGA++CiFYa2MdXr8ed6wtUaXAQ==",
"app_displayname": "Application Name
"appid": "********-****-****-****-************",
"appidacr": "1",
"idp": "https://sts.windows.net/********-****-****-****-************/",
"oid": "********-****-****-*****************",
"rh": "*.******_*************-******************************.",
"roles": [
"POP.AccessAsApp",
"IMAP.AccessAsApp",
"SMTP.SendAsApp"
],
"sid": "********-****-****-****-************",
"sub": "********-****-****-****-************",
"tid": "********-****-****-****-************",
"uti": "**********************",
"ver": "1.0",
"wids": [
"********-****-****-****-************"
]
}
What settings should be set by the administrator in office 365 for access via the EWS protocol? What besides office 365 settings can affect access to the server?
ivan  
#2 Posted : Tuesday, August 22, 2023 5:13:30 PM(UTC)
ivan

Rank: Administration

Groups: Administrators
Joined: 11/11/2010(UTC)
Posts: 1,152

Thanks: 9 times
Was thanked: 55 time(s) in 55 post(s)
Hi, to use EWS protocol,

You need to assign full_access_as_app:

https://www.emailarchite...ll-access-app-permission

and I suggest that you use Graph API instead of EWS protocol, because MS has announced that EWS will no longer be updated, and Graph API is strongly recommended.

https://www.emailarchite...spx#graph-api-permission
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.043 seconds.

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.