Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Issue with acquireTokenAsync - access token missing deviceid #191

Open
leewhitbeck opened this issue May 31, 2018 · 2 comments
Open

Issue with acquireTokenAsync - access token missing deviceid #191

leewhitbeck opened this issue May 31, 2018 · 2 comments

Comments

@leewhitbeck
Copy link

leewhitbeck commented May 31, 2018

Issue Description

I'm running into an issue calling acquireTokenAsync. The generated token from the acquireTokenAsync call "appears" to be valid, but when I run a post to MSFT graph api using this generated token (post is happening in my express middleware), I get the error message below.

Note: I am using Microsoft Intune with broker authentication using Microsoft Authenticator.

# error : AADSTS5300 "your device is required to be managed to access this resource.

Anyone have any ideas why this is happening ?

Here is the configuration object I use in the post to the /oauth2/token endpoint.

        grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',
        client_id: ********,
        client_secret:*******
        assertion: ******
        requested_token_use: 'on_behalf_of',
        resource: ‘https://graph.microsoft.com/’,
        scope: 'openid email offline_access User.Read Calendars.Read Calendars.ReadWrite Calendars.ReadWrite.Shared'

Here is my environment configuration cli packages: (/usr/local/lib/node_modules)

Issue Environment

@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:

cordova (Cordova CLI) : 8.0.0
local packages:

@ionic/app-scripts : 3.1.9
Cordova Platforms : android 7.1.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:

Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
Node : v8.11.1
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.3 Build version 9E145

@leewhitbeck
Copy link
Author

leewhitbeck commented Jun 5, 2018

Update: I noticed that the jwt token generated by acquireTokenAsync does not include deviceId if I manually unenroll and then enroll again. I'm wondering if that finding highlights a potential configuration issue with Intune or AD? The 'your device is required to managed' error is occurring in IOS and Android.

@leewhitbeck leewhitbeck changed the title Issue with acquireTokenAsync when userID is not included Issue with acquireTokenAsync - access token missing deviceid Aug 2, 2018
@leewhitbeck
Copy link
Author

Turns out this library needs to be updated AzureAD/azure-activedirectory-library-for-objc#1249

@leewhitbeck leewhitbeck reopened this Aug 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant