0
votes

I have created an Azure AD native client application and have given delegated permissions to Azure Service Management API. Now, I'm able to invoke the service management API using my id from a Windows Phone 8.1 app using ADAL library. However, another user can't invoke operations on their subscription even though I add them as co-administrator in my directory. I get the token for the user but when I try to make an API call, I get 'Invalid token:A security token exception occurred for the JWT token'. Is there a way to allow another user to access details about his subscriptions using ADAL authentication from an AD app hosted in someone else's AD? I have searched for any related information for quite some time and I'd gladly take any help.

1
What login authority have you used?Mayur Tendulkar
I have used https://login.windows.net/<tenant-id>Sridhar
try login.windows.net/common and let me knowMayur Tendulkar

1 Answers

0
votes

Here is what I interpret what you are doing.

You have a native app and it is connected to your tenant and it works fine for accessing service management APIs in your tenant/subscription.

You gave the app to a friend and they are trying to use it to access service management APIs in their tenant/subscription.

The suggestion above in the comment is on the right track, but you need to look at the steps for making your native application multi-tenant. This way, the AD service will know to look for the tenant for the authenticated user. Changing the url to use 'common' instead of the tenant id is one of the steps required. Here are a couple of posts to help with that transition. http://www.cloudidentity.com/blog/2013/04/09/walkthrough-3-developing-multi-tenant-web-applications-with-windows-azure-ad/

This is a native client example of multi-tenant for a windows store app. I could not find one in the repo for a phone app. Hopefully, this gets you on the right track. https://github.com/AzureADSamples/NativeClient-WebAPI-MultiTenant-WindowsStore