It is pretty clear that he was not graduated magna cum laude because of affirmative action. Affirmative action only applies to admissions, not to academics.
The accreditation agencies require that each student be issued a course syllabus in which the way grades will be determined in detail, and it is assumed that all students will be treated equally. Where there is grade inflation, it generally means that students will get a C rather than a D, or a B rather than a C. Grade inflation applies to all students. Professors do not award bonus points for students being Black, Jewish, Chinese, White or whatever.
It is very unlikely that affirmative action caused Obama to graduate magna cum laude. Again. this depends entirely on grades and is issued by the chief academic officer (Dean, VP for Academic Affairs, Provost: the title varies).