def fetch_csrf_token_for_provisioning(mac: false)
      response = request(:post, "account/#{platform_slug(mac)}/profile/listProvisioningProfiles.action", {
         teamId: team_id,
         pageNumber: 1,
         pageSize: 1,
         sort: 'name=asc'
       })

      parse_response(response, 'provisioningProfiles')
      return nil
    end
def fetch_csrf_token_for_provisioning(mac: false)
      response = request(:post, "account/#{platform_slug(mac)}/profile/listProvisioningProfiles.action", {
         teamId: team_id,
         pageNumber: 1,
         pageSize: 1,
         sort: 'name=asc'
       })

      parse_response(response, 'provisioningProfiles')
      return nil
    end
We need a custom way to fetch the csrf token for the provisioning profile requests, since
 we use a separate API endpoint (host of Xcode API) to fetch the provisioning profiles
 All we do is fetch one profile (if exists) to get a valid csrf token with its time stamp
 This method is being called from all requests that modify, create or downloading provisioning
 profiles.
 Source https://github.com/fastlane/fastlane/issues/5903