feat(roles): export built-in Intune roles; fix ASCII header failure
- Drop the ExpiresOn request header. Under an en-US culture its date contains U+202F before AM/PM, so every Graph call failed with "Request headers must contain only ASCII characters". Nothing reads it. - Export all role definitions with their assignments, including built-in roles (was custom only via isBuiltIn eq false). - On import, skip creating built-in roles. When Import assignments is on, recreate their assignments against the exported role id (built-in ids are identical across tenants). Custom-role behaviour is unchanged.
This commit is contained in:
@@ -431,7 +431,6 @@ function Invoke-GraphRequest
|
||||
$Headers = @{
|
||||
'Content-Type' = 'application/json; charset=utf-8'
|
||||
'Authorization' = "Bearer " + $global:MSALToken.AccessToken
|
||||
'ExpiresOn' = $global:MSALToken.ExpiresOn
|
||||
'x-ms-client-request-id' = $requestId
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user