Can we use ADAL token to book a meeting room instead of passing password, using C# or is there any way to book a meeting room with out asking user to enter password

Hi

we have a requirement to book a meeting room, but for that we need to give password. so we wondering if there is any way like passing OAuth token like thing to book a room.

Thanks adv,

--Sravan kumar

June 17th, 2015 12:12pm

>> is any way like passing OAuth token like thing to book a room.

The short answer is yes but you haven't really given enough detail in your question to put the answer in context.

Eg what API are you using are you using EWS or the new REST Calendar API (or universal endpoint) in Office365 https://msdn.microsoft.com/en-us/office/office365/api/api-catalog 

It sounds like what you want is the App-Only token ADAL workflow described in http://blogs.msdn.com/b/exchangedev/archive/2015/01/22/building-demon-or-service-apps-with-office-365-mail-calendar-and-contacts-apis-oauth2-client-credential-flow.aspx then create an Event with that Token https://msdn.microsoft.com/office/office365/APi/calendar-rest-operations#CreateAnEvent

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
June 18th, 2015 12:16am

<o:p></o:p>

Hi Glen,<o:p></o:p>

<o:p> </o:p>

Thanks for the reply,<o:p></o:p>

From past two days i am trying to understand the content in the links provided by you. below are the details that i have used in my application

Authority: login.windowsnet/microsoft.onmicrosoftcom/

Resource iD : api.offciecom/discovery

in azure AD given permission for

windows Azure active directory

office 365 exchange online

office 365 sharepoint online

office 365 unified API 

After all my trails below are the outcome.<o:p></o:p>

<o:p> </o:p>

1. While creating the authentication context :<o:p> </o:p>

  Authority: An internal error has occurred while evaluating method Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.get_Authority(). string

  CorrelationId: An internal error has occurred while evaluating method Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.get_CorrelationId(). System.Guid

  TokenCache: An internal error has occurred while evaluating method Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.get_TokenCache(). Microsoft.IdentityModel.Clients.ActiveDirectory.TokenCache

  UseCorporateNetwork: An internal error has occurred while evaluating method Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.get_UseCorporateNetwork(). bool

  ValidateAuthority: An internal error has occurred while evaluating method Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.get_ValidateAuthority(). bool

2. On creating the OutlookServicesClient :<o:p></o:p>

  

  Me: An internal error has occurred while evaluating method Microsoft.Office365.OutlookServices.OutlookServicesClient.get_Me(). Microsoft.Office365.OutlookServices.IUserFetcher

  Users: An internal error has occurred while evaluating method Microsoft.Office365.OutlookServices.OutlookServicesClient.get_Users(). Microsoft.Office365.OutlookServices.IUserCollection


3. on creating a Event with above outlook client:

exception: An error occurred while processing this request.

Inner exception: The type 'System.Collections.Generic.IList`1[Microsoft.Office365.OutlookServices.Attachment]' is not supported by the client library.

<o:p>I tried to attach images but its not allowing so i wrote all the error that i am facing. </o:p>

Could you please help me with the above errors.<o:p></o:p>

<o:p> </o:p>

Please let me know if you need any more info.<o:p></o:p>

<o:p> </o:p>

Thanks,<o:p></o:p>

Sravan kumar.<o:p></o:p>


<o:p></o:p>

June 21st, 2015 11:33am

You need to post the code your using and what is working and what isn't working eg are you getting a token okay ?

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2015 12:43am

sorry, not bale to post any images or links :(

Application that i am targeting is windows 10 universal apps (xaml and c#)

i am able to get the token from AAD with authority Microsoft.onmicrosoft.com

but while creating outlook client , out client is creating but when we expand the object it shows

Me: An internal error has occurred while evaluating method Microsoft.Office365.OutlookServices.OutlookServicesClient.get_Me(). Microsoft.Office365.OutlookServices.IUserFetcher

  Users: An internal error has occurred while evaluating method Microsoft.Office365.OutlookServices.OutlookServicesClient.get_Users(). Microsoft.Office365.OutlookServices.IUserCollection

using the above client if i try to create a event giving below exception

exception: An error occurred while processing this request.

Inner exception: The type 'System.Collections.Generic.IList`1[Microsoft.Office365.OutlookServices.Attachment]' is not supported by the client library.

previously we used EWS to send meeting requesting but users need to pass their credentials like below

service.Credentials = new WebCredentials("user1@contoso.com", "password");

but we can not ask user to enter his credentials, so thought to utilize the ADAL token to send meeting request on user be half, so that they can modify or cancel meeting from out look.

our mail accounts are exchange online dedicated.

 till now i used office 365 apis that you mentioned in the link but got issues which i mentioned in my previous reply.

is there any separate APIs for exchange online dedicated accounts or am i doing anything wrong...

please guide me.

Thanks,

Sravan kumar.

June 22nd, 2015 3:56am

>> exchange online dedicated

I've only had limited experience with dedicated I know some where still using 2010, the REST API's are new and it maybe you have some feature lag in your tenant. If your using a dedicated tenant you should also have a dedicated Microsoft Account Manger. I would push your question back through the account manager they should be able to answer your question on the availability of the particular API's in your tenant.

I guess a really quick way to test yourself is just try API sandbox https://apisandbox.msdn.microsoft.com/ if you sign into your tenant and give the authorization you should then be able to test running REST ops against your tenant.

The exceptions your getting aren't particular useful I would suggest using something like fiddler and look at the REST request and responses your getting which will tell you more about what is actually going on.

cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2015 12:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics