0

I am trying to understand the API's that #Microsoft provides. Its just so messy. My goal is to use the Exchange API to edit settings.

So, I have an APP, Access tokens and subscriptions.

When trying to login to https://outlook.office365.com/ I get the following error:

Your subscription is no longer active. Please contact your admin to activate your subscription. X-ClientId: 05A0A74F610C432EA1AD48C77829580B request-id 3088673c-f523-4e26-824f-1d0f7cb0a219 X-OWA-Error Microsoft.Exchange.Data.Storage.TenantAccessBlockedException X-OWA-Version 15.20.2451.30 X-FEServer HE1PR05CA0360 X-BEServer HE1P190MB0508 Date:18/11/2019 09:11:34 

But as you can see, I have a subscription:

365

What I understand is that I have to login to outlook.office365.com before using the API.

Update

Ok, so I can now login to https://outlook.office365.com/mail/inbox. It took a while............. But;

1) I can request: https://outlook.office365.com/api/beta/users/********************************/. It will return the specified user. 2) I can NOT https://outlook.office365.com/api/beta/users/********************************/mailfolders. I tells me 'access denied'. While my app has all Exchange, Office365 permissions. But delegate and application permissions.

3
  • It is unclear what you're asking here. You've tagged 4 different APIs and no sample code showing what you're doing. Commented Nov 18, 2019 at 15:34
  • Any update on this issue? Is my answer helpful? Commented Nov 21, 2019 at 3:10
  • Hi Digital Human. Accepting or replying to answers is not strictly mandatory here, but the platform would collapse if no-one replied to anyone, and you appear to still be signing in. Would you reply to @AllenWu please? Commented May 30, 2020 at 18:35

1 Answer 1

1

The "Grant admin consent for your tenant" feature seems to have been updated yesterday.

However, something is wrong with the new "Grant admin consent for your tenant" feature based on my test.

If you use it to grant admin consent, it will probably not take effect on the back end although admin consent has been successfully completed on Azure Portal.

Currently you could grant admin consent through a URL request.

https://login.microsoftonline.com/{your tenant}/oauth2/authorize?client_id={app id of your Azure AD app}&response_type=code&redirect_uri={redirect uri of your Azure AD app}&nonce=1234&resource=https://outlook.office365.com/&prompt=admin_consent 

Please note that you need to create a new Azure AD App currently because if you have used admin consent on Azure Portal, granting admin consent through a URL request will not take effect.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.