added optional parameter to set AAD Graph API version