ews-managed-api icon indicating copy to clipboard operation
ews-managed-api copied to clipboard

[Feature?] Missing AppIdentityToken from WebServices.Auth

Open Harkole opened this issue 7 years ago • 4 comments

I was hoping to use the package to perform the AppIdentityToken routine provided at https://docs.microsoft.com/en-us/outlook/add-ins/validate-an-identity-token [code shown below] but I can't seem to find the "Auth" namespaces.

using Microsoft.Exchange.WebServices.Auth.Validation;

AppIdentityToken ValidateIdentityToken(string rawToken, string expectedAudience)
{
    try
    {
        AppIdentityToken appIdToken = AuthToken.Parse(rawToken) as AppIdentityToken;
        appIdToken.Validate(new Uri(expectedAudience));

        // No exception, validation succeeded
        return appIdToken;
    }
    catch (TokenValidationException ex)
    {
        throw new Exception(string.Format("Token validation failed: {0}", ex.Message));
    }
}

I'm hoping you'll tell me I'm being blind! If it's not implemented is there any plan to implement? I've got a API that's pretty much complete and have been asked to add basic Outlook Web Plugin calls to it but the whole thing is written in .Net Core.

Harkole avatar Mar 23 '18 23:03 Harkole

@Harkole Were you able to resolve this? I have the same issue.

Blackbaud-AdamHickey avatar Feb 14 '19 22:02 Blackbaud-AdamHickey

@Blackbaud-AdamHickey I've just had a look back at the project (it's been archived off) and I don't think I did looking at the code. However, we have moved over to looking at the Microsoft Graph API as it provides exactly what we need and in addition is easier for the end user/client to setup/manage.

I can't remember where exactly but I did see something about EWS being discontinued pretty soon

Will-Blackburn avatar Feb 15 '19 11:02 Will-Blackburn

Interesting. I'll check it out.

Blackbaud-AdamHickey avatar Feb 15 '19 15:02 Blackbaud-AdamHickey

I can't remember where exactly but I did see something about EWS being discontinued pretty soon

You’re wrong, they are only discontinuing the basic authentication again EWS in Office 365. See https://techcommunity.microsoft.com/t5/Exchange-Team-Blog/Upcoming-changes-to-Exchange-Web-Services-EWS-API-for-Office-365/ba-p/608055

EWS will continue to work on premise and if you switch the authentication to some other scheme (like oauth tokens or some other supported scheme)

svrooij avatar Jun 29 '19 10:06 svrooij