#AzureActiveDirectory #AzureADTokenType #AuthenticationToken #TokenType #Token Azure Active Directory Authentication Token id_token Access Token Refresh Token Microsoft Article - How to use Postman to request token? The below mentioned script will help you to request a new access token and refresh token with the help of current refresh token which you have captured from postman. Also make sure you have replaced the value of clientid and client secret with your directory application. From permission prespective make sure you have granted the application the permission to access user data from the api permission section of the application object in Azure AD. How application works in Azure AD ? ============================================ # SCRIPT BEGINS FROM HERE # Write-Host "Script to request new access token and refresh token from refresh token" $tenant = Read-Host ('Enter your Tenant Name') Write-Host Tenant name you entered is $tenant Write-Host "Enter the value you have copied from postman" $refresh_token = Read-Host ('Enter your refresh token') $Openid = Invoke-RestMethod -uri " $tenant/v2.0/.well-known/openid-configuration" $authendpoint = $ $tokenendpoint = $ Write-Host Authorize endpoint of your tenant is $authendpoint Write-Host Token endpoint of your tenant is $tokenendpoint $Body = @{ client_id = "9a21d7a5-a500-4ee9-8ea27325c24" client_secret = "TrHSZaO53-wwNV__Ff" redirect_uri = "https://localhost" grant_type = "refresh_token" scope= " " tenant = "$tenant" refresh_token = $refresh_token } $token = Invoke-RestMethod -uri $tokenendpoint -Body $Body -Method Post $token #SCRIPT ENDS# ============================================= Regards, ConceptsWork











