Open petarov opened 1 week ago
@petarov , is the device registered ?
Please check if your device is registered via Authenticator
You can see it via Authenticator app -> Settings -> Device Registration
I see you already mentioned you have com.microsoft.adalcache in keychain entitlement . When you acquireToken with deviceId claim, does it return the deviceId ?
Both key and value in extraDeviceInformation dictionary is of type NSString
Hi and thanks for coming back to me @Veena11
Yes, the device is registered in Authenticator and it also gets shown on Microsoft Entra under Devices - All devices.
When you acquireToken with deviceId claim, does it return the deviceId ?
Yes, the claim "deviceid":"58f0e261-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
can be seen in the access token json result.
If I send device claims for the id token i.e. MSALClaimsRequestTargetIdToken
, then both the Access token and ID_token
contain the deviceid
claim. However, in all cases the extraDeviceInformation
remains empty - I've stepped into with the debugger to double check.
I can probably just use the claim by accessing result.account.accountClaims?["deviceid"]
with the acquireToken
call, but I thought using extraDeviceInformation
is the right way. Any ideas?
Hi,
Similar questions seem to have been asked a couple of time already, but I'm stuck and I'd appreciate some help.
I'm new to Entra and I'm working on an app that initiates a WPJ using Authenticator as a broker. My end goal is to fetch the registered
Device ID
into my app and send it to another 3rd party service. My app has the$(AppIdentifierPrefix)com.microsoft.adalcache
keychain entitlement and I'm using the{"access_token":{"deviceid":{"essential":true}}}
device claim with theacquireToken
call, so that seems to work.Now I'm trying to use the
MSALPublicClientApplication
callsgetDeviceInformation
orgetWPJMetaDataDevice
to fetch theextraDeviceInformation
dictionary and read theDevice ID
. Unfortunately there are always errors being produced and the dictionary remains empty.Examples:
Logs:
Logs:
I'm testing with the latest Authenticator app from TestFlight and using Xcode Debug Run on an iPhone device.
What am I missing or doing wrong here?