2015年6月8日月曜日

Azure AD Graph APIのexpire

Azure ADのGraphAPIを利用して、Access Tokenを取得すると、次のようなレスポンスが得られる。


resource: 00000002-xxxx-xxxx-xxxx-000000000000 
access_token: eyJ0eXAi....
expires_in: 3599
token_type: Bearer
not_before: 1433747097
expires_on: 1433750997

各値の意味は下記を参照
https://msdn.microsoft.com/en-us/library/azure/dn645538.aspx

expires_in : トークンの有効期間(秒数) (通常 1時間)
expires_on : トークンの有効時刻 1970-01-01T0:0:0Z UTCからの秒数
not_before : トークンの発行時刻 1970-01-01T0:0:0Z UTCからの秒数