3

I have two applications registered in AD tenant(lets say App A and App B).

App A has API access to App B and it uses client credential flow to acquire access token.
Access token expire time is 60mins default and Requirement is to set 10mins.

I have followed instructions available on these links,
configurable-token-lifetimes and StackoverflowQuestion.

But it is not working. When i try to get access token using postman client credential flow, still i am getting 60mins only.

I have applied the AD policy to Both application and service principal of App A.

> New-AzureADPolicy -Definition-Definition
> @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"00:10:00","MaxAgeSessionSingleFactor":"00:10:00",
> "MaxInactiveTime":"00:10:00","MaxAgeMultiFactor":"until-revoked","MaxAgeSingleFactor":"00:10:00"}}')
> -DisplayName "Acesstokenlifetimeforchilemail" -IsOrganizationDefault $false -Type "TokenLifetimePolicy"
> Add-AzureADApplicationPolicy -Id de1cc996-3ce6-4902-8a94-da9858b955cb -RefObjectId
> 10107ca9-bd7a-4c38-beb5-20d84a3a0806
> Add-AzureADServicePrincipalPolicy -Id f6340519-e9e4-46d4-8d5d-7d93e0936c1e -RefObjectId
> 10107ca9-bd7a-4c38-beb5-20d84a3a0806

I verified whether policy is applied to app and service principal.

> PS C:\WINDOWS\system32> Get-AzureADPolicyAppliedObject -Id
> 10107ca9-bd7a-4c38-beb5-20d84a3a0806

> de1cc996-3ce6-4902-8a94-da9858b955cb   #microsoft.graph.application  
> f6340519-e9e4-46d4-8d5d-7d93e0936c1e #microsoft.graph.servicePrincipal

I have checked the postman script also. I am using same tenant and token point.

Please help me to fix the issue.

Community
  • 1
  • 1
Raj
  • 735
  • 1
  • 7
  • 24
  • 2
    this feature is being removed because it had issues. Your profile has no contact info, so I am unable to share details of how to use its replacement for which we are signing users for a private preview – Kalyan Krishna Mar 29 '19 at 13:51
  • @KalyanKrishna Can i share personal email to get details? or is there any github repo of this example? – Raj Mar 30 '19 at 08:04
  • kalyan.krishna@microsoft.com. I'd advise, to provide some sort of contact info in your profile page as well – Kalyan Krishna Mar 30 '19 at 19:53

0 Answers0